search for: getaddressofsymbol

Displaying 20 results from an estimated 21 matches for "getaddressofsymbol".

2012 Aug 30
1
[LLVMdev] Problems building llvm on AIX
...upport/DynamicLibrary.cpp:79:35: error: 'dlerror' was not declared in this scope llvm-3.1/llvm/lib/Support/DynamicLibrary.cpp:96:19: error: 'dlclose' was not declared in this scope llvm-3.1/llvm/lib/Support/DynamicLibrary.cpp: In member function 'void* llvm::sys::DynamicLibrary::getAddressOfSymbol(const char*)': llvm-3.1/llvm/lib/Support/DynamicLibrary.cpp:104:32: error: 'dlsym' was not declared in this scope llvm-3.1/llvm/lib/Support/DynamicLibrary.cpp: In static member function 'static void* llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(const char*)': llvm-3.1/llv...
2004 Jun 19
0
[LLVMdev] Problems loading passes on Mac OS X
...retty - on OS X, it automatically > prepends an underscore to the symbol, which means that if you are > looking for main(), you ask for "main" and it looks for "_main", which > is how the symbols are named in Mach-O. > This could be the source of a problem - how does GetAddressOfSymbol in > DynamicLinker.cpp use dlsym? I believe that GetAddressOfSymbol is only used by the JIT. The -load mechanism just dlopens a shared object. Shared objects for plugins have static constructors (".init" section) that are supposed to autoregister the pass when the plugin is loaded....
2004 Dec 29
2
[LLVMdev] Errors when compiling DynamicLibrary.cpp for Debug build
...ary::SearchForAddressOfSymbol(const char*)': c:/projects/src/llvm-1/llvm/lib/System/win32/DynamicLibrary.cpp:114: error: invalid conversion from `int (*)()' to `void*' c:/projects/src/llvm-1/llvm/lib/System/win32/DynamicLibrary.cpp: In member function `void* llvm::sys::DynamicLibrary::GetAddressOfSymbol(const char*)': c:/projects/src/llvm-1/llvm/lib/System/win32/DynamicLibrary.cpp:122: error: invalid conversion from `int (*)()' to `void*' make[1]: *** [/C/projects/build/MinGW/llvm-1-1/lib/System/Debug/DynamicLibrary.o] Error 1 ---------------- Henrik. =============================...
2004 Jun 19
2
[LLVMdev] Problems loading passes on Mac OS X
...t dlsym is less pretty - on OS X, it automatically prepends an underscore to the symbol, which means that if you are looking for main(), you ask for "main" and it looks for "_main", which is how the symbols are named in Mach-O. This could be the source of a problem - how does GetAddressOfSymbol in DynamicLinker.cpp use dlsym? Does it assume anything about the symbol names? #include <dlfcn.h> // dlcompat int main(int argc, const char **argv){ void *obj = dlopen(argv[1], RTLD_NOW | RTLD_GLOBAL); void * sym = dlsym(obj,argv[2]); printf("done: obj was %x sym was %x %s\n&...
2004 Jun 19
2
[LLVMdev] Problems loading passes on Mac OS X
...it automatically >> prepends an underscore to the symbol, which means that if you are >> looking for main(), you ask for "main" and it looks for "_main", which >> is how the symbols are named in Mach-O. >> This could be the source of a problem - how does GetAddressOfSymbol in >> DynamicLinker.cpp use dlsym? > > I believe that GetAddressOfSymbol is only used by the JIT. The -load > mechanism just dlopens a shared object. Shared objects for plugins > have > static constructors (".init" section) that are supposed to autoregister > t...
2003 Oct 25
3
[LLVMdev] version 1.0, compiling under cygwin
Hello llvmdev, (just for fun) I've tried to compile LLVM under cygwin. With "make -k" I got only: ----------------- DynamicLinker.cpp: In function `void* GetAddressOfSymbol(const char*)': DynamicLinker.cpp:40: error: `RTLD_DEFAULT' undeclared (first use this function) DynamicLinker.cpp:40: error: (Each undeclared identifier is reported only once for each function it appears in.) ----------------- well, the only value supported in cygwin's dlfcn....
2016 Apr 02
3
getSymbolAddressInProcess returning null
I've finally managed to extract from Kaleidoscope one particular thing that it seems to me should be working and isn't. Given the global declaration extern "C" void foo() {} within the same program I have RTDyldMemoryManager::getSymbolAddressInProcess("foo") And it's returning null. (LLVM 3.8, Windows 7 x64.) What am I missing? -------------- next part
2004 Dec 29
0
[LLVMdev] Errors when compiling DynamicLibrary.cpp for Debug build
...sOfSymbol(const char*)': > c:/projects/src/llvm-1/llvm/lib/System/win32/DynamicLibrary.cpp:114: error: > invalid conversion from `int (*)()' to `void*' > c:/projects/src/llvm-1/llvm/lib/System/win32/DynamicLibrary.cpp: In member > function `void* llvm::sys::DynamicLibrary::GetAddressOfSymbol(const char*)': > c:/projects/src/llvm-1/llvm/lib/System/win32/DynamicLibrary.cpp:122: error: > invalid conversion from `int (*)()' to `void*' > make[1]: *** > [/C/projects/build/MinGW/llvm-1-1/lib/System/Debug/DynamicLibrary.o] Error 1 > ---------------- > > Henr...
2004 Jun 20
0
[LLVMdev] Problems loading passes on Mac OS X
...prepends an underscore to the symbol, which means that if you are >>> looking for main(), you ask for "main" and it looks for "_main", >>> which >>> is how the symbols are named in Mach-O. >>> This could be the source of a problem - how does GetAddressOfSymbol >>> in >>> DynamicLinker.cpp use dlsym? >> >> I believe that GetAddressOfSymbol is only used by the JIT. The -load >> mechanism just dlopens a shared object. Shared objects for plugins >> have >> static constructors (".init" section) t...
2004 Dec 30
1
[LLVMdev] Errors when compiling DynamicLibrary.cpp for Debug build
...nst char*)': >>c:/projects/src/llvm-1/llvm/lib/System/win32/DynamicLibrary.cpp:114: error: >>invalid conversion from `int (*)()' to `void*' >>c:/projects/src/llvm-1/llvm/lib/System/win32/DynamicLibrary.cpp: In member >>function `void* llvm::sys::DynamicLibrary::GetAddressOfSymbol(const char*)': >>c:/projects/src/llvm-1/llvm/lib/System/win32/DynamicLibrary.cpp:122: error: >>invalid conversion from `int (*)()' to `void*' >>make[1]: *** >>[/C/projects/build/MinGW/llvm-1-1/lib/System/Debug/DynamicLibrary.o] Error 1 >>----------------...
2019 Aug 13
4
ORC v2 question
Hi Lang, On Tue, 13 Aug 2019 at 22:03, Lang Hames <lhames at gmail.com> wrote: > When you say your code is not getting optimized, do you mean that IR optimizations are not being applied, or that codegen optimizations are not being applied? > > What do you see if you dump the modules before/after running the pass manager on them, like this: > > dbgs() << "Before
2006 Aug 16
2
[LLVMdev] Weird behavior of llvm-ld
...::string> plugins = LoadableModules; for (std::vector<std::string>::iterator I = plugins.begin(), E = plugins.end(); I != E; ++I) { sys::DynamicLibrary dll(I->c_str()); typedef void (*OptimizeFunc)(PassManager&,int); OptimizeFunc OF = OptimizeFunc( (intptr_t)dll.GetAddressOfSymbol("RunOptimizations")); if (OF == 0) { throw std::string("Optimization Module '") + *I + "' is missing the RunOptimizations symbol"; } (*OF)(Passes,OptLevel); } The RunOptimizations-symbol is only mentioned briefly in the manual of llv...
2003 Oct 25
0
[LLVMdev] version 1.0, compiling under cygwin
...gwin. > With "make -k" I got only: Cool. We don't rountinely use this configuration, so there may be a bit of leg work you'll have to do... :) But that said, we would love to get LLVM working cleanly on it! > ----------------- > DynamicLinker.cpp: In function `void* GetAddressOfSymbol(const char*)': > DynamicLinker.cpp:40: error: `RTLD_DEFAULT' undeclared (first use this > function) > DynamicLinker.cpp:40: error: (Each undeclared identifier is reported only once > for each function it appears in.) > ----------------- > > well, the only value su...
2006 Sep 19
3
[LLVMdev] failed assertion in PPCJITInfo.cpp when calling native function
Hi, This is a follow up to my previous email since I have now found out a bit more about what goes wrong. I am generating JIT code that calls a native function, but I get the following assertion telling me that the PC relative jump is too long: /llvm/lib/Target/PowerPC/PPCJITInfo.cpp:206: failed assertion `ResultPtr >= -(1 << 23) && ResultPtr < (1 << 23) &&
2006 Sep 16
0
[LLVMdev] failed assertion in PPCJITInfo.cpp when calling native function
...lLinkage, "llvmFunction", module); BasicBlock* block = new BasicBlock("Entry", llvmFunction); new CallInst(nativeFunction, vector<Value*>(), "", block); new ReturnInst(block); sys::DynamicLibrary dynamicLibrary; void* nativePointer = dynamicLibrary.GetAddressOfSymbol("nativeFunction"); assert(nativePointer); ExistingModuleProvider* moduleProvider = new ExistingModuleProvider(module); ExecutionEngine* executionEngine = ExecutionEngine::create(moduleProvider); executionEngine->addGlobalMapping(nativeFunction, nativePointer); executionEngine...
2019 Aug 14
3
ORC v2 question
Hi Lang, On Tue, 13 Aug 2019 at 23:26, Lang Hames <lhames at gmail.com> wrote: >> I also get this message: >> JIT session error: Symbols not found: { raise_error } > > > Ahh -- I see the problem. The DynamicLibrarySearchGenerator is using the getAddressOfSymbol method, which (under the hood) is basically issuing an appropriate dlsym lookup, and that does not find explicitly added symbols. To find explicitly added symbols you need to call DynamicLibrary::SearchForAddressOfSymbol instead, but unfortunately that method's behavior is not a good fit for wh...
2004 Dec 31
0
[LLVMdev] Primer with LLVM
...s and ld with a little more effort) to create a dynamically loadable shared object (.so or .dll). You can then instantiate a DynamicLibrary object to load your compiled library into your thread (include/llvm/System/DynamicLibrary.h). Once loaded, your thread can use DynamicLibrary::GetAddressOfSymbol to find "main" and start executing it. > A sample code will be greatfully :-) Unfortunately, I don't know of any code that does this. bugpoint is close, but it uses fork(2). Reid. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature....
2004 Jun 19
0
[LLVMdev] Problems loading passes on Mac OS X
On Sat, 19 Jun 2004, Michael McCracken wrote: > Hi, I can't get opt to list (in -help) passes that I load using -load. > I see in the list archives that a similar problem has been brought up > before but I didn't see whether it was resolved. Also, this is on Mac > OS X, and the previous question was about Linux. The problem is that this has not been implemented yet on Mac
2006 Aug 16
0
[LLVMdev] Weird behavior of llvm-ld
...leModules; > for (std::vector<std::string>::iterator I = plugins.begin(), E = > plugins.end(); I != E; ++I) { > sys::DynamicLibrary dll(I->c_str()); > typedef void (*OptimizeFunc)(PassManager&,int); > OptimizeFunc OF = OptimizeFunc( > (intptr_t)dll.GetAddressOfSymbol("RunOptimizations")); > if (OF == 0) { > throw std::string("Optimization Module '") + *I + > "' is missing the RunOptimizations symbol"; > } > (*OF)(Passes,OptLevel); > } > > The RunOptimizations-symbol is only...
2004 Jun 19
2
[LLVMdev] Problems loading passes on Mac OS X
Hi, I can't get opt to list (in -help) passes that I load using -load. I see in the list archives that a similar problem has been brought up before but I didn't see whether it was resolved. Also, this is on Mac OS X, and the previous question was about Linux. This problem happens with the Hello pass, so I'll use that to illustrate. I'm using LLVM 1.2. The plugin loads with no