commit 7faa417e1a2c0e85e5ac2c647c099c3f972141a5 Author: Simon Hausmann Date: Mon Nov 23 12:38:26 2009 +0100 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 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)