[PATCH] [AArch64] Add missing PCRel relocations for AArch64 in RuntimeDyldELF

Tim Northover t.p.northover at gmail.com
Wed Feb 5 05:11:04 PST 2014


  Hi Bradley,

  I think this patch might be opening up a can of worms. AArch64 doesn't support the small memory model at all in MCJIT at the moment. The relocations you've added are necessary, but only a small section of the ones that would be needed.

  I'm also a little concerned about enabling small memory-model JIT tests in general. Linux's mmap seems to make startlingly few guarantees about just how close to your requested address the memory you get will be (at least on its man page). It sounds like something that will work most of the time, but might randomly fail in some odd set of circumstances.

  Cheers.

  Tim.


================
Comment at: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:459
@@ +458,3 @@
+    // Operation: Page(S+A) - Page(P)
+    uint64_t Result = ((Value + Addend) & ~0xfffU) - (FinalAddress & ~0xfffU);
+
----------------
Shouldn't the constants be ULL? I'd have thought ~0xfffU would be (unsigned)0xfffff000 and then get zero-extended to 64-bits.


http://llvm-reviews.chandlerc.com/D2696



More information about the llvm-commits mailing list