+2012-01-27 Hajime Morita <morrita@google.com>
+
+ [JSC] ThunkGenerators.cpp should hide its asm-defined symbols
+ https://bugs.webkit.org/show_bug.cgi?id=77244
+
+ Reviewed by Filip Pizlo.
+
+ * jit/ThunkGenerators.cpp: Added HIDE_SYMBOLS()
+ * wtf/InlineASM.h: Moved some duplicated macros from ThunkGenerators.cpp
+
2012-01-27 Simon Hausmann <simon.hausmann@nokia.com>
[JSC] Asm-originated symbols should be marked as hidden
#include "ThunkGenerators.h"
#include "CodeBlock.h"
-#include <wtf/text/StringImpl.h>
+#include "InlineASM.h"
#include "SpecializedThunkJIT.h"
+#include <wtf/text/StringImpl.h>
#if ENABLE(JIT)
return jit.finalize(*globalData, globalData->jitStubs->ctiNativeCall());
}
-#if OS(DARWIN) || (OS(WINDOWS) && CPU(X86))
-#define SYMBOL_STRING(name) "_" #name
-#else
-#define SYMBOL_STRING(name) #name
-#endif
-
-#if (OS(LINUX) || OS(FREEBSD)) && CPU(X86_64)
-#define SYMBOL_STRING_RELOCATION(name) #name "@plt"
-#elif OS(DARWIN) || (CPU(X86_64) && COMPILER(MINGW) && !GCC_VERSION_AT_LEAST(4, 5, 0))
-#define SYMBOL_STRING_RELOCATION(name) "_" #name
-#elif CPU(X86) && COMPILER(MINGW)
-#define SYMBOL_STRING_RELOCATION(name) "@" #name "@4"
-#else
-#define SYMBOL_STRING_RELOCATION(name) #name
-#endif
#define UnaryDoubleOpWrapper(function) function##Wrapper
enum MathThunkCallingConvention { };
asm( \
".text\n" \
".globl " SYMBOL_STRING(function##Thunk) "\n" \
+ HIDE_SYMBOL(function##Thunk) "\n" \
SYMBOL_STRING(function##Thunk) ":" "\n" \
"call " SYMBOL_STRING_RELOCATION(function) "\n" \
"ret\n" \
asm( \
".text\n" \
".globl " SYMBOL_STRING(function##Thunk) "\n" \
+ HIDE_SYMBOL(function##Thunk) "\n" \
SYMBOL_STRING(function##Thunk) ":" "\n" \
"subl $8, %esp\n" \
"movsd %xmm0, (%esp) \n" \
#if (OS(LINUX) || OS(FREEBSD)) && CPU(X86_64)
#define SYMBOL_STRING_RELOCATION(name) #name "@plt"
+#elif OS(DARWIN) || (CPU(X86_64) && COMPILER(MINGW) && !GCC_VERSION_AT_LEAST(4, 5, 0))
+#define SYMBOL_STRING_RELOCATION(name) "_" #name
#elif CPU(X86) && COMPILER(MINGW)
#define SYMBOL_STRING_RELOCATION(name) "@" #name "@4"
#else