Displaying 1 result from an estimated 1 matches for "createstubfunc".
2015 Jan 26
2
[LLVMdev] [llvm] r188726 - Adding PIC support for ELF on x86_64 platforms
...b/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Mon Aug 19 18:27:43 2013
@@ -169,6 +169,9 @@ ObjectImage *RuntimeDyldImpl::loadObject
}
}
+ // Give the subclasses a chance to tie-up any loose ends.
+ finalizeLoad();
+
return obj.take();
}
@@ -424,6 +427,10 @@ uint8_t *RuntimeDyldImpl::createStubFunc
writeInt16BE(Addr+6, 0x07F1); // brc 15,%r1
// 8-byte address stored at Addr + 8
return Addr;
+ } else if (Arch == Triple::x86_64) {
+ *Addr = 0xFF; // jmp
+ *(Addr+1) = 0x25; // rip
+ // 32-bit PC-relative address of the GOT entry will be stored at Addr+2
}...