Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2484,9 +2484,14 @@ const MCExpr *AArch64AsmPrinter::emitPAuthRelocationAsIRelative(
OutStreamer->emitLabel(Place);
OutStreamer->pushSection();

const MCSymbolELF *Group =
static_cast<MCSectionELF *>(OutStreamer->getCurrentSectionOnly())
->getGroup();
OutStreamer->switchSection(OutStreamer->getContext().getELFSection(
".text.startup", ELF::SHT_PROGBITS, ELF::SHF_ALLOC | ELF::SHF_EXECINSTR,
0, "", true, PAuthIFuncNextUniqueID++, nullptr));
".text.startup", ELF::SHT_PROGBITS,
ELF::SHF_ALLOC | ELF::SHF_EXECINSTR | (Group ? ELF::SHF_GROUP : 0), 0,
Group, true, Group ? MCSection::NonUniqueID : PAuthIFuncNextUniqueID++,
nullptr));

MCSymbol *IRelativeSym =
OutStreamer->getContext().createLinkerPrivateSymbol("pauth_ifunc");
Expand Down
6 changes: 6 additions & 0 deletions llvm/test/CodeGen/AArch64/ptrauth-irelative.ll
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,9 @@
; CHECK-NEXT: .section .rodata
; CHECK-NEXT: .xword [[FUNC]]@FUNCINIT
@globalref8 = constant ptr ptrauth (ptr getelementptr (i8, ptr @global, i64 8), i32 2, i64 5, ptr null), align 8

$comdat = comdat any
@comdat = constant ptr ptrauth (ptr null, i32 2, i64 1, ptr null), align 8, comdat
; CHECK: comdat:
; CHECK-NEXT: [[PLACE:.*]]:
; CHECK-NEXT: .section .text.startup,"axG",@progbits,comdat,comdat
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.