[PATCH] [ELF]: Initial implementation for ARM static linking
Shankar Kalpathi Easwaran
shankarke at gmail.com
Tue Dec 2 20:02:17 PST 2014
Need some more tests
a) TLS
b) Check the ARM relocations that you have implemented.
You havent fixed up the exidx_start/end symbol.
I dont see the defsym test testing pieces of ARM functionality that you have implemented.
================
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:
----------------
Can you indent some of these manually.
================
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);
+}
+
----------------
Isnt this suppose to use a veneer/shim to reach if the target is ARM ?
================
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();
----------------
I think you should cache this address.
http://reviews.llvm.org/D6446
More information about the llvm-commits
mailing list