[PATCH] [ELF][X86_64] Handle R_X86_64_PC64 relocation

Rui Ueyama ruiu at google.com
Sun Feb 22 19:25:39 PST 2015


REPOSITORY
  rL LLVM

================
Comment at: lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.cpp:62
@@ +61,3 @@
+  int64_t result = (uint64_t)((S + A) - P);
+  *reinterpret_cast<llvm::support::ulittle64_t *>(location) =
+      result |
----------------
Can you add using llvm::support::ulittle64_t at beginning of the file and use that here?

================
Comment at: lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.cpp:64
@@ +63,3 @@
+      result |
+      (uint64_t) * reinterpret_cast<llvm::support::ulittle64_t *>(location);
+}
----------------
Not sure if clang-format formatted like this, but I think there should be no space around "*".

http://reviews.llvm.org/D7820

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list