[PATCH] D27629: Fix unwind info relocation with large code model on AArch64

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 03:45:45 PST 2016


peter.smith added a comment.

The relocation calculation looks right, but I'm not convinced about the ulittle64_t with the information I have right now. I suggest that if https://reviews.llvm.org/D27609 is approved this should follow.



================
Comment at: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:342
+    uint64_t Result = Value + Addend - FinalAddress;
+    support::ulittle64_t::ref{TargetPtr} = Result;
+    break;
----------------
Why is this ulittle64_t? I see a comment in D27609 about causing trouble on big-endian systems, but that doesn't explain why.

On aarch64 big-endian instructions are little-endian but data is big-endian. Relocations that are applied to instructions are always written little endian, but relocations that are written to data should be written in the target endianness. The R_AARCH64_PREL64 is only applied to data so I am not expecting to see ulittle64_t here.  


https://reviews.llvm.org/D27629





More information about the llvm-commits mailing list