[llvm] 6d67f7a - [JITLink][EHFrameSupport] Remove CodeAlignmentFactor and DataAlignmentFactor validation.

Sunho Kim via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 9 23:29:44 PDT 2022


Author: Sunho Kim
Date: 2022-06-10T15:29:20+09:00
New Revision: 6d67f7a3294d86cae5d15c0e10183e41a569a8f9

URL: https://github.com/llvm/llvm-project/commit/6d67f7a3294d86cae5d15c0e10183e41a569a8f9
DIFF: https://github.com/llvm/llvm-project/commit/6d67f7a3294d86cae5d15c0e10183e41a569a8f9.diff

LOG: [JITLink][EHFrameSupport] Remove CodeAlignmentFactor and DataAlignmentFactor validation.

Removes CodeAlignmentFactor and DataAlignmentFactor validation in EHFrameEdgeFixer. I observed some of aarch64 elf files generated by clang contains CIE record with code_alignment_factor = 4 or data_alignment_factor = -8. code_alignment_factor and  data_alignment_factor are used by call fram instruction that should be correctled handled by libunwind.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D127062

Added: 
    

Modified: 
    llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp b/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
index 6770239f93349..b1492cd745083 100644
--- a/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
@@ -213,10 +213,6 @@ Error EHFrameEdgeFixer::processCIE(ParseContext &PC, Block &B,
     uint64_t CodeAlignmentFactor = 0;
     if (auto Err = RecordReader.readULEB128(CodeAlignmentFactor))
       return Err;
-    if (CodeAlignmentFactor != 1)
-      return make_error<JITLinkError>("Unsupported CIE code alignment factor " +
-                                      Twine(CodeAlignmentFactor) +
-                                      " (expected 1)");
   }
 
   // Read and validate the data alignment factor.
@@ -224,10 +220,6 @@ Error EHFrameEdgeFixer::processCIE(ParseContext &PC, Block &B,
     int64_t DataAlignmentFactor = 0;
     if (auto Err = RecordReader.readSLEB128(DataAlignmentFactor))
       return Err;
-    if (DataAlignmentFactor != -8)
-      return make_error<JITLinkError>("Unsupported CIE data alignment factor " +
-                                      Twine(DataAlignmentFactor) +
-                                      " (expected -8)");
   }
 
   // Skip the return address register field.


        


More information about the llvm-commits mailing list