diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-06-27 08:49:28 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-10 18:03:11 +0200 |
commit | 4379bae227f3212bc4253b919d3ccc8865b80ebf (patch) | |
tree | ec0c185a7ee24ef486f917df3a332ef3f1dabaaa /src/qml/qml/v4 | |
parent | 89137996329da45fe3e11abafa76cda9819e8d63 (diff) |
Fix registration of unwind tables on Android
On bionic we need to call a different symbol right from bionic instead of using
dlsym() to find the original arm exception table registration function.
Change-Id: I6bf20454e5395f7b09a46d4be3502e401abcd1b2
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src/qml/qml/v4')
-rw-r--r-- | src/qml/qml/v4/qv4unwindhelper_p-arm.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/qml/qml/v4/qv4unwindhelper_p-arm.h b/src/qml/qml/v4/qv4unwindhelper_p-arm.h index 3fecb22ff9..dd1f1e4856 100644 --- a/src/qml/qml/v4/qv4unwindhelper_p-arm.h +++ b/src/qml/qml/v4/qv4unwindhelper_p-arm.h @@ -199,13 +199,18 @@ void UnwindHelper::writeARMUnwindInfo(void *codeAddr, int codeSize) QT_END_NAMESPACE +#if defined(Q_OS_ANDROID) +extern "C" void *dl_unwind_find_exidx(void *pc, int *entryCount); +#endif + extern "C" Q_DECL_EXPORT void *__gnu_Unwind_Find_exidx(void *pc, int *entryCount) { +#if !defined(Q_OS_ANDROID) typedef void *(*Old_Unwind_Find_exidx)(void*, int*); static Old_Unwind_Find_exidx oldFunction = 0; - static ptrdiff_t *exidx = (ptrdiff_t*)malloc(2 * sizeof(uintptr_t)); if (!oldFunction) oldFunction = (Old_Unwind_Find_exidx)dlsym(RTLD_NEXT, "__gnu_Unwind_Find_exidx"); +#endif { QMutexLocker locker(&QT_PREPEND_NAMESPACE(QV4::functionProtector)); @@ -218,7 +223,11 @@ extern "C" Q_DECL_EXPORT void *__gnu_Unwind_Find_exidx(void *pc, int *entryCount } } +#if defined(Q_OS_ANDROID) + return dl_unwind_find_exidx(pc, entryCount); +#else return oldFunction(pc, entryCount); +#endif } #endif // QV4UNWINDHELPER_PDW2_H |