Skip to content

Commit da9fc52

Browse files
committed
Address review comments
1 parent db99224 commit da9fc52

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
@@ -1094,10 +1094,7 @@ void RelocationScanner::processAux(RelExpr expr, RelType type, uint64_t offset,
10941094
(expr == R_AARCH64_AUTH_GOT || expr == R_AARCH64_AUTH_GOT_PAGE_PC);
10951095
uint16_t flags = sym.flags.load(std::memory_order_relaxed);
10961096
if (!(flags & NEEDS_GOT)) {
1097-
if (needsGotAuth)
1098-
sym.setFlags(NEEDS_GOT | NEEDS_GOT_AUTH);
1099-
else
1100-
sym.setFlags(NEEDS_GOT);
1097+
sym.setFlags(needsGotAuth ? (NEEDS_GOT | NEEDS_GOT_AUTH) : NEEDS_GOT);
11011098
} else if (needsGotAuth != static_cast<bool>(flags & NEEDS_GOT_AUTH)) {
11021099
fatal("both AUTH and non-AUTH GOT entries for '" + sym.getName() +
11031100
"' 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)