Skip to content

Commit 20bd1a9

Browse files
committed
Address review comments
1 parent cbb7176 commit 20bd1a9

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
@@ -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)