Separating ELF and MachO stub info functions for RuntimeDyld

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192737 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Kaylor
2013-10-15 21:32:56 +00:00
parent 977ce007ad
commit 72be32c633
3 changed files with 39 additions and 23 deletions

View File

@@ -55,6 +55,19 @@ class RuntimeDyldMachO : public RuntimeDyldImpl {
bool isPCRel,
unsigned Size);
unsigned getMaxStubSize() {
if (Arch == Triple::arm || Arch == Triple::thumb)
return 8; // 32-bit instruction and 32-bit address
else if (Arch == Triple::x86_64)
return 8; // GOT entry
else
return 0;
}
unsigned getStubAlignment() {
return 1;
}
struct EHFrameRelatedSections {
EHFrameRelatedSections() : EHFrameSID(RTDYLD_INVALID_SECTION_ID),
TextSID(RTDYLD_INVALID_SECTION_ID),