Skip to content

Commit 5e6c325

Browse files
committed
Address review comments
1 parent e6b7d20 commit 5e6c325

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
@@ -1107,10 +1107,7 @@ void RelocationScanner::processAux(RelExpr expr, RelType type, uint64_t offset,
11071107
(expr == R_AARCH64_AUTH_GOT || expr == R_AARCH64_AUTH_GOT_PAGE_PC);
11081108
uint16_t flags = sym.flags.load(std::memory_order_relaxed);
11091109
if (!(flags & NEEDS_GOT)) {
1110-
if (needsGotAuth)
1111-
sym.setFlags(NEEDS_GOT | NEEDS_GOT_AUTH);
1112-
else
1113-
sym.setFlags(NEEDS_GOT);
1110+
sym.setFlags(needsGotAuth ? (NEEDS_GOT | NEEDS_GOT_AUTH) : NEEDS_GOT);
11141111
} else if (needsGotAuth != static_cast<bool>(flags & NEEDS_GOT_AUTH)) {
11151112
fatal("both AUTH and non-AUTH GOT entries for '" + sym.getName() +
11161113
"' 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
@@ -735,13 +735,13 @@ void GotSection::writeTo(uint8_t *buf) {
735735
ctx.target->writeGotHeader(buf);
736736
ctx.target->relocateAlloc(*this, buf);
737737
for (const AuthEntryInfo &authEntry : authEntries) {
738-
// https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#default-signing-schema
738+
// https://github.com/ARM-software/abi-aa/blob/2024Q3/pauthabielf64/pauthabielf64.rst#default-signing-schema
739739
// Signed GOT entries use the IA key for symbols of type STT_FUNC and the
740740
// DA key for all other symbol types, with the address of the GOT entry as
741741
// the modifier. The static linker must encode the signing schema into the
742742
// GOT slot.
743743
//
744-
// https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#encoding-the-signing-schema
744+
// https://github.com/ARM-software/abi-aa/blob/2024Q3/pauthabielf64/pauthabielf64.rst#encoding-the-signing-schema
745745
// If address diversity is set and the discriminator
746746
// is 0 then modifier = Place
747747
uint8_t *dest = buf + authEntry.offset;

0 commit comments

Comments
 (0)