diff options
author | Tim Northover <Tim.Northover@arm.com> | 2013-05-04 20:13:59 +0000 |
---|---|---|
committer | Tim Northover <Tim.Northover@arm.com> | 2013-05-04 20:13:59 +0000 |
commit | fa1b2f85da66ac40eda3e6c3fb34c3d02892e171 (patch) | |
tree | 32d0e622023e030909657c6642d46f56bfd89409 /llvm/lib/Target/AArch64 | |
parent | a958a57081c0a598b6822aec1534c58e4c9239a4 (diff) | |
download | bcm5719-llvm-fa1b2f85da66ac40eda3e6c3fb34c3d02892e171.tar.gz bcm5719-llvm-fa1b2f85da66ac40eda3e6c3fb34c3d02892e171.zip |
AArch64: implement first relocation required for MCJIT
R_AARCH64_PCREL32 is present in even trivial .eh_frame sections and so
is required to compile any function without the "nounwind" attribute.
This change implements very basic infrastructure in the RuntimeDyldELF
file and allows (for example) the test-shift.ll MCJIT test to pass
on AArch64.
llvm-svn: 181131
Diffstat (limited to 'llvm/lib/Target/AArch64')
-rw-r--r-- | llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp index 7960db08c8d..819eeadb44e 100644 --- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp +++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp @@ -81,6 +81,12 @@ static MCCodeGenInfo *createAArch64MCCodeGenInfo(StringRef TT, Reloc::Model RM, if (CM == CodeModel::Default) CM = CodeModel::Small; + else if (CM == CodeModel::JITDefault) { + // The default MCJIT memory managers make no guarantees about where they can + // find an executable page; JITed code needs to be able to refer to globals + // no matter how far away they are. + CM = CodeModel::Large; + } X->InitMCCodeGenInfo(RM, CM, OL); return X; |