diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-11-23 11:38:26 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-11-23 11:38:26 (GMT) |
commit | 7faa417e1a2c0e85e5ac2c647c099c3f972141a5 (patch) | |
tree | 07e974729cb29c2a8981f9fc4c6704065d960c32 /src/3rdparty | |
parent | 366af17676a87943c8a7c2380a8819bdd3815878 (diff) | |
download | Qt-7faa417e1a2c0e85e5ac2c647c099c3f972141a5.zip Qt-7faa417e1a2c0e85e5ac2c647c099c3f972141a5.tar.gz Qt-7faa417e1a2c0e85e5ac2c647c099c3f972141a5.tar.bz2 |
Fix symbol exports in QtScript with gcc
Symbols declared as extern "C" will always be exported even when using
-fvisibility=hidden (see gcc man-page).
Instead of exporting we surround the extern declaration with a pragma
push and pop to change the default visibility.
In addition the use of HIDE_SYMBOL was missing in the "arm traditional"
branch for declaring the trampoline functions in JITStubs.cpp
Task-number: QTBUG-5513
Reviewed-by: Kent Hansen
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp | 3 | ||||
-rw-r--r-- | src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp index 073b35a..b098728 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp @@ -561,6 +561,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiTrampoline) "\n" +HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "stmdb sp!, {r1-r3}" "\n" "stmdb sp!, {r4-r8, lr}" "\n" @@ -584,6 +585,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" +HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" "mov r0, sp" "\n" "mov lr, r6" "\n" @@ -593,6 +595,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" // Both has the same return sequence ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" +HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "add sp, sp, #32" "\n" "ldmia sp!, {r4-r8, lr}" "\n" diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h index 43975ff..c2b8c02 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h +++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h @@ -246,6 +246,10 @@ namespace JSC { MacroAssemblerCodePtr m_ctiNativeCallThunk; }; +#if COMPILER(GCC) +#pragma GCC visibility push(hidden) +#endif + extern "C" { EncodedJSValue JIT_STUB cti_op_add(STUB_ARGS_DECLARATION); EncodedJSValue JIT_STUB cti_op_bitand(STUB_ARGS_DECLARATION); @@ -363,6 +367,10 @@ extern "C" { void* JIT_STUB cti_vm_lazyLinkCall(STUB_ARGS_DECLARATION); } // extern "C" +#if COMPILER(GCC) +#pragma GCC visibility pop +#endif + } // namespace JSC #endif // ENABLE(JIT) |