[PATCH] D127062: [JITLink] Remove CodeAlignmentFactor and DataAlignmentFactor validation
Sunho Kim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 4 18:08:40 PDT 2022
sunho created this revision.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
sunho requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This patch 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. If I'm understading correctly, code_alignment_factor and data_alignment_factor are used by call fram instruction that should be correctled handled by libunwind. But, I also see the verification was added in the intial code base and not touched since then.
https://reviews.llvm.org/D127062
Files:
llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
Index: llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
===================================================================
--- llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
+++ llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
@@ -213,10 +213,6 @@
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 @@
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127062.434301.patch
Type: text/x-patch
Size: 1127 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220605/2ad60bc8/attachment.bin>
More information about the llvm-commits
mailing list