Skip to content

Commit 262b4c6

Browse files
committed
Address review comments
1 parent e179c9b commit 262b4c6

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

lld/ELF/Relocations.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,10 +1129,7 @@ void RelocationScanner::processAux(RelExpr expr, RelType type, uint64_t offset,
11291129
(expr == R_AARCH64_AUTH_GOT || expr == R_AARCH64_AUTH_GOT_PAGE_PC);
11301130
uint16_t flags = sym.flags.load(std::memory_order_relaxed);
11311131
if (!(flags & NEEDS_GOT)) {
1132-
if (needsGotAuth)
1133-
sym.setFlags(NEEDS_GOT | NEEDS_GOT_AUTH);
1134-
else
1135-
sym.setFlags(NEEDS_GOT);
1132+
sym.setFlags(needsGotAuth ? (NEEDS_GOT | NEEDS_GOT_AUTH) : NEEDS_GOT);
11361133
} else if (needsGotAuth != static_cast<bool>(flags & NEEDS_GOT_AUTH)) {
11371134
fatal("both AUTH and non-AUTH GOT entries for '" + sym.getName() +
11381135
"' requested, but only one type of GOT entry per symbol is "

lld/ELF/SyntheticSections.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,13 +731,13 @@ void GotSection::writeTo(uint8_t *buf) {
731731
ctx.target->writeGotHeader(buf);
732732
ctx.target->relocateAlloc(*this, buf);
733733
for (const AuthEntryInfo &authEntry : authEntries) {
734-
// https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#default-signing-schema
734+
// https://github.com/ARM-software/abi-aa/blob/2024Q3/pauthabielf64/pauthabielf64.rst#default-signing-schema
735735
// Signed GOT entries use the IA key for symbols of type STT_FUNC and the
736736
// DA key for all other symbol types, with the address of the GOT entry as
737737
// the modifier. The static linker must encode the signing schema into the
738738
// GOT slot.
739739
//
740-
// https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#encoding-the-signing-schema
740+
// https://github.com/ARM-software/abi-aa/blob/2024Q3/pauthabielf64/pauthabielf64.rst#encoding-the-signing-schema
741741
// If address diversity is set and the discriminator
742742
// is 0 then modifier = Place
743743
uint8_t *dest = buf + authEntry.offset;

0 commit comments

Comments
 (0)