[llvm] r175268 - Give these callbacks hidden visibility. It is better to not export them more

Rafael Espindola rafael.espindola at gmail.com
Fri Feb 15 06:16:00 PST 2013


Author: rafael
Date: Fri Feb 15 08:15:59 2013
New Revision: 175268

URL: http://llvm.org/viewvc/llvm-project?rev=175268&view=rev
Log:
Give these callbacks hidden visibility. It is better to not export them more
than we need to and some ELF linkers complain about directly accessing symbols
with default visibility.

Modified:
    llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp
    llvm/trunk/lib/Target/X86/X86JITInfo.cpp

Modified: llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp?rev=175268&r1=175267&r2=175268&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp Fri Feb 15 08:15:59 2013
@@ -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;

Modified: llvm/trunk/lib/Target/X86/X86JITInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86JITInfo.cpp?rev=175268&r1=175267&r2=175268&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86JITInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86JITInfo.cpp Fri Feb 15 08:15:59 2013
@@ -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.





More information about the llvm-commits mailing list