Give these callbacks hidden visibility. It is better to not export them more
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 15 Feb 2013 14:15:59 +0000 (14:15 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 15 Feb 2013 14:15:59 +0000 (14:15 +0000)
than we need to and some ELF linkers complain about directly accessing symbols
with default visibility.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175268 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCJITInfo.cpp
lib/Target/X86/X86JITInfo.cpp

index bf2e30339f01564ffb5f07d0c1f1c0b69bf0f7a1..79d0c1fabeede950e2bbf365964fd87d1ffaa77b 100644 (file)
@@ -292,9 +292,10 @@ void PPC64CompilationCallback() {
 #endif
 
 extern "C" {
-void* LLVMPPCCompilationCallback(unsigned *StubCallAddrPlus4,
-                                 unsigned *OrigCallAddrPlus4,
-                                 bool is64Bit) {
+void* LLVM_LIBRARY_VISIBILITY
+LLVMPPCCompilationCallback(unsigned *StubCallAddrPlus4,
+                           unsigned *OrigCallAddrPlus4,
+                           bool is64Bit) {
   // Adjust the pointer to the address of the call instruction in the stub
   // emitted by emitFunctionStub, rather than the instruction after it.
   unsigned *StubCallAddr = StubCallAddrPlus4 - 1;
index 3ae0630b6048d011eea9040f76cb926e4eda8ff7..aeb05ccdf815c739bd9327547a10e9f01db1c3e8 100644 (file)
@@ -339,7 +339,8 @@ extern "C" {
 /// must locate the start of the stub or call site and pass it into the JIT
 /// compiler function.
 extern "C" {
-void LLVMX86CompilationCallback2(intptr_t *StackPtr, intptr_t RetAddr) {
+void LLVM_LIBRARY_VISIBILITY LLVMX86CompilationCallback2(intptr_t *StackPtr,
+                                                         intptr_t RetAddr) {
   intptr_t *RetAddrLoc = &StackPtr[1];
   // We are reading raw stack data here. Tell MemorySanitizer that it is
   // sufficiently initialized.