diff options
author | Shih-wei Liao <sliao@google.com> | 2011-07-17 12:18:21 -0700 |
---|---|---|
committer | Shih-wei Liao <sliao@google.com> | 2011-07-17 12:22:16 -0700 |
commit | e4742793dcba49887f90011fc7a3a858cf70a8cf (patch) | |
tree | fb2394142c7edc5c2095b25fde029dbbb01f0917 | |
parent | 41c74e13ed51f64d46b859ddce0edc3abb1fd635 (diff) | |
download | linkloader-e4742793dcba49887f90011fc7a3a858cf70a8cf.tar.gz |
Ensure that only the path today that supports mode-switching (ARM/Thumb2) is exercised.
BUG=5039224, 5036610, 5036755
Change-Id: Ie2b7562f18fa50373838139f1d049cafeabe1b52
-rw-r--r-- | include/impl/ELFObject.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/impl/ELFObject.hxx b/include/impl/ELFObject.hxx index 14b39de..83e8aa6 100644 --- a/include/impl/ELFObject.hxx +++ b/include/impl/ELFObject.hxx @@ -179,11 +179,13 @@ relocateARM(void *(*find_sym)(void *context, char const *name), case STT_NOTYPE: if (S == 0) { void *ext_func = find_sym(context, sym->getName()); +#ifdef SUPPORT_NEAR_JUMP_EVEN_IF_BLc2BLX_NEEDED S = (Inst_t)(uintptr_t)ext_func; sym->setAddress(ext_func); uint32_t result = (S >> 2) - (P >> 2) + A; if (result > 0x007fffff && result < 0xff800000) { +#endif #ifndef __arm__ // We have not implement function stub in this runtime env rsl_assert(0 && "Target address is far from call instruction"); @@ -199,7 +201,9 @@ relocateARM(void *(*find_sym)(void *context, char const *name), sym->setAddress(stub); S = (uint32_t)stub; #endif +#ifdef SUPPORT_NEAR_JUMP_EVEN_IF_BLc2BLX_NEEDED } +#endif } break; } |