[lld] [X86, lld] Handle relocation R_X86_64_REX2_GOTPCRELX (PR #109783)

via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 28 20:36:40 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 3d34053af61ff45e05d230d2678eb8e95322eb14 009d8970013f01c5df8de8777c1872b73efe3a61 --extensions cpp -- lld/ELF/Arch/X86_64.cpp
``````````

</details>

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

``````````diff
diff --git a/lld/ELF/Arch/X86_64.cpp b/lld/ELF/Arch/X86_64.cpp
index 2cdfeac035..b778b9aa9d 100644
--- a/lld/ELF/Arch/X86_64.cpp
+++ b/lld/ELF/Arch/X86_64.cpp
@@ -898,8 +898,8 @@ RelExpr X86_64::adjustGotPcExpr(RelType type, int64_t addend,
 // "Intel 64 and IA-32 Architectures Software Developer's Manual V2"
 // (http://www.intel.com/content/dam/www/public/us/en/documents/manuals/
 //    64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf)
-static void relaxGotNoPic(uint8_t *loc, uint64_t val, uint8_t op,
-                          uint8_t modRm, bool isRex2) {
+static void relaxGotNoPic(uint8_t *loc, uint64_t val, uint8_t op, uint8_t modRm,
+                          bool isRex2) {
   const uint8_t rex = loc[-3];
   // Convert "test %reg, foo at GOTPCREL(%rip)" to "test $foo, %reg".
   if (op == 0x85) {

``````````

</details>


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


More information about the llvm-commits mailing list