[PATCH] [ELF]: Initial implementation for ARM static linking

Denis Protivensky dprotivensky at accesssoftek.com
Wed Dec 17 23:13:12 PST 2014


Replaced this with http://reviews.llvm.org/D6716.
This one should be dropped.


================
Comment at: lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.cpp:101-103
@@ +100,5 @@
+  case R_ARM_THM_JUMP11:
+    return int16_t(
+               *reinterpret_cast<const llvm::support::little16_t *>(location)) &
+           0x7FF;
+  default:
----------------
shankarke wrote:
> Can you indent some of these manually.
Ok.

================
Comment at: lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.cpp:189-192
@@ +188,6 @@
+/// \brief R_ARM_THM_CALL - ((S + A) | T) - P => S + A - P
+static void relocR_ARM_THM_CALL(uint8_t *location, uint64_t P, uint64_t S,
+                                int64_t A, bool useJs) {
+  return relocR_ARM_THM_B_L(location, P, S, A, useJs);
+}
+
----------------
shankarke wrote:
> Isnt this suppose to use a veneer/shim to reach if the target is ARM ?
In general - yes, but it's not implemented in this initial work.

================
Comment at: lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.cpp:416-417
@@ +415,4 @@
+      targetVAddress = _ARMTargetLayout.getGOTSymAddr();
+    } else if (auto segment =
+                   _ARMTargetLayout.findSegmentByAtom(ref.target())) {
+      targetVAddress = segment->virtualAddr();
----------------
shankarke wrote:
> I think you should cache this address.
Good.

http://reviews.llvm.org/D6446

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






More information about the llvm-commits mailing list