================
@@ -725,6 +725,60 @@ bool GOTBuilder::visitEdge(LinkGraph &G, Block *B, Edge
&E) {
return true;
}
+/// Create a new node in the link-graph for the given stub template.
+template <size_t Size>
+static Block &allocStub(LinkGraph &G, Section &S, const uint8_t (&Code)[Size])
{
+ constexpr uint64_t Alignment = 4;
+ ArrayRef<char> Template(reinterpret_cast<const char *>(Code), Size);
+ return G.createContentBlock(S, Template, orc::ExecutorAddr(), Alignment, 0);
+}
+
+const uint8_t Armv5LongLdrPc[] = {
+ 0x04, 0xf0, 0x1f, 0xe5, // ldr pc, [pc,#-4] ; L1
+ 0x00, 0x00, 0x00, 0x00, // L1: .word S
+};
+
+ // TODO: There is only ARM far stub now. We should add the Thumb stub,
----------------
weliveindetail wrote:
Done with
https://github.com/llvm/llvm-project/pull/79082/commits/559606e8b3354482e2e1b759a8e212e8899ac3fa
https://github.com/llvm/llvm-project/pull/79082
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits