[lld] [llvm] [lld][AArch64][ELF][PAC] Support AUTH relocations and AUTH ELF marking (PR #72714)

via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 18 03:05:10 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 580f60484e193b4f7f853ea34cc35f4a3240dfa7 28153a18131208aaed518a0971210b90c5ddaa29 -- lld/ELF/Arch/AArch64.cpp lld/ELF/Config.h lld/ELF/Driver.cpp lld/ELF/InputFiles.cpp lld/ELF/InputFiles.h lld/ELF/InputSection.cpp lld/ELF/Relocations.cpp lld/ELF/Relocations.h lld/ELF/SyntheticSections.cpp lld/ELF/SyntheticSections.h lld/ELF/Writer.cpp llvm/include/llvm/BinaryFormat/ELF.h llvm/tools/llvm-readobj/ELFDumper.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp
index ded38cdecf..8145813ff7 100644
--- a/lld/ELF/SyntheticSections.cpp
+++ b/lld/ELF/SyntheticSections.cpp
@@ -364,10 +364,10 @@ bool AArch64PauthAbiTag::isNeeded() const {
 }
 
 void AArch64PauthAbiTag::writeTo(uint8_t *buf) {
-  write32(buf, 4);                             // Name size
+  write32(buf, 4);                                  // Name size
   write32(buf + 4, ctx.aarch64PauthAbiTag->size()); // Content size
-  write32(buf + 8, NT_ARM_TYPE_PAUTH_ABI_TAG); // Type
-  memcpy(buf + 12, "ARM", 4);                  // Name string
+  write32(buf + 8, NT_ARM_TYPE_PAUTH_ABI_TAG);      // Type
+  memcpy(buf + 12, "ARM", 4);                       // Name string
   memcpy(buf + 16, ctx.aarch64PauthAbiTag->data(),
          ctx.aarch64PauthAbiTag->size());
   memset(buf + 16 + ctx.aarch64PauthAbiTag->size(), 0,

``````````

</details>


https://github.com/llvm/llvm-project/pull/72714


More information about the llvm-commits mailing list