[lld] [llvm] [llvm-objdump][ARM] Find ELF file PLT entries for arm, thumb (PR #130764)

via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 13 08:11:05 PDT 2025


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 431eaa8deb4ea1cbe079a29126f9559e4716f00d e99620022c57f3d0cbd0bc01c3e5a5e80a5946d3 --extensions cpp,h -- llvm/include/llvm/MC/MCInstrAnalysis.h llvm/include/llvm/Object/ELFObjectFile.h llvm/lib/Object/ELFObjectFile.cpp llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp llvm/tools/llvm-objdump/llvm-objdump.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp b/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
index 68b1302c0c..51f71bbdd7 100644
--- a/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
+++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
@@ -394,7 +394,7 @@ static MCRelocationInfo *createARMMCRelocationInfo(const Triple &TT,
 
 template <typename T, size_t N>
 static bool instructionsMatch(const T (&Insns)[N], const uint8_t *Buf,
-                             llvm::endianness E) {
+                              llvm::endianness E) {
   for (size_t I = 0; I < N; ++I) {
     T Val = support::endian::read<T>(Buf + I * sizeof(T), E);
     if (Val != Insns[I]) {
@@ -502,7 +502,7 @@ public:
         };
 
         if (instructionsMatch(Insns, PltContents.data() + Byte + 8,
-                                    InstrEndianness)) {
+                              InstrEndianness)) {
           // add ip, pc at Byte + 8 + thumb-pc-bias = 12
           uint64_t Offset =
               (PltSectionVA + Byte + 12) + OffsetLower + OffsetHigher;
@@ -520,7 +520,7 @@ public:
            Byte += 4) {
         // Is it a long entry?
         if (instructionsMatch(LongEntryInsns, PltContents.data() + Byte,
-                                    InstrEndianness)) {
+                              InstrEndianness)) {
           // Expected instruction sequence:
           //
           //     ldr ip, L2

``````````

</details>


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


More information about the llvm-commits mailing list