Skip to content

Commit badc14f

Browse files
committed
Switch to printLocation from getLocation
1 parent 4f6c348 commit badc14f

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
@@ -1095,10 +1095,11 @@ void RelocationScanner::processAux(RelExpr expr, RelType type, uint64_t offset,
10951095
if (!(flags & NEEDS_GOT)) {
10961096
sym.setFlags(needsGotAuth ? (NEEDS_GOT | NEEDS_GOT_AUTH) : NEEDS_GOT);
10971097
} else if (needsGotAuth != static_cast<bool>(flags & NEEDS_GOT_AUTH)) {
1098-
Err(ctx) << "both AUTH and non-AUTH GOT entries for '" << sym.getName()
1099-
<< "' requested, but only one type of GOT entry per symbol is "
1100-
"supported"
1101-
<< getLocation(ctx, *sec, sym, offset);
1098+
auto diag = Err(ctx);
1099+
diag << "both AUTH and non-AUTH GOT entries for '" << sym.getName()
1100+
<< "' requested, but only one type of GOT entry per symbol is "
1101+
"supported";
1102+
printLocation(diag, *sec, sym, offset);
11021103
}
11031104
}
11041105
} 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)