search for: addsymbol

Displaying 20 results from an estimated 40 matches for "addsymbol".

2013 Nov 11
0
[LLVMdev] Android JIT patch
...that reconnects them. That is, I'm against moving things from RTDyldMemoryManager into ExecutionEngine. Second, unless I'm reading it wrong, this relies on static constructors. That causes headaches and is against the LLVM coding standards. Third, I don't think sys::DynamicLibrary::AddSymbol() is the right way to go here. I know I have recently suggested using that function, but I was wrong. That function exposes symbols to the entire host program as if they were present in a locally loaded shared library. For some programs that may be acceptable behavior, but it cannot be the defau...
2013 Nov 11
2
[LLVMdev] Android JIT patch
...it wrong, this relies on static constructors. That causes headaches and is against the LLVM coding standards. My bad, I just ripped off the existing implementation. I guess the JITMemoryManager part is destined to go away along with the JIT. > > Third, I don't think sys::DynamicLibrary::AddSymbol() is the right way to go here. I know I have recently suggested using that function, but I was wrong. That function exposes symbols to the entire host program as if they were present in a locally loaded shared library. For some programs that may be acceptable behavior, but it cannot be the defau...
2013 Nov 11
4
[LLVMdev] Android JIT patch
...I moved the StatSymbols code into ExecutionEngine.cpp rather than JITMemoryManager.cpp since it's required for both the JIT and MCJIT, and deleted the code in RTDyldMemoryManager.cpp which did the same thing for fewer functions. They should now be picked up through the sys::DynamicLibrary::AddSymbol mechanism in both cases. The symbols required for ARM/Android are then added by an identical hack just below. There's one other minor change since setLastModificationAndAccessTime can't be supported on Android; all relevant system calls are missing from the C library. I've therefore...
2010 Aug 19
2
[LLVMdev] using external functions from llvm
...stem::number; result->data = reinterpret_cast<unsigned char*>(new double(args[0].DoubleVal)); llvm::GenericValue gv; gv.PointerVal = reinterpret_cast<void*>(result); return gv; } defined in an extern "C" block. I add it as a symbol with: llvm::sys::DynamicLibrary::AddSymbol("lle_X_create_number_object",(void*)lle_X_create_number_object); yet when attempting to call it I still get: "LLVM ERROR: Program used external function 'create_number_object' which could not be resolved!" -------------- next part -------------- An HTML attachment was s...
2013 Nov 11
0
[LLVMdev] Android JIT patch
...it wrong, this relies on static constructors. That causes headaches and is against the LLVM coding standards. My bad, I just ripped off the existing implementation. I guess the JITMemoryManager part is destined to go away along with the JIT. > > Third, I don't think sys::DynamicLibrary::AddSymbol() is the right way to go here. I know I have recently suggested using that function, but I was wrong. That function exposes symbols to the entire host program as if they were present in a locally loaded shared library. For some programs that may be acceptable behavior, but it cannot be the defau...
2013 Nov 14
3
[LLVMdev] Android JIT patch
...wrong, this relies on static constructors. That causes headaches and is against the LLVM coding standards. > My bad, I just ripped off the existing implementation. I guess the JITMemoryManager part is destined to go away along with the JIT. >> Third, I don't think sys::DynamicLibrary::AddSymbol() is the right way to go here. I know I have recently suggested using that function, but I was wrong. That function exposes symbols to the entire host program as if they were present in a locally loaded shared library. For some programs that may be acceptable behavior, but it cannot be the defau...
2014 May 28
2
[LLVMdev] how to call the function in hosting code from JITted IR code..?
Dears, I'm trying to call the function that defined in the host application from IR code, but LLVM is saying that there is no such function... I've seen the tutorial of Kaleidoscope, and defined the function as extern "C" { void test1(void) { cout << "test function in the host application \n" ; } } ...in the host application. Would you please let me give any
2015 Jan 05
2
[LLVMdev] LLVM linkage error - Program used external function 'foo' which could not be resolved!
Hi, All I got a linkage error as indicated in the subject line. Any suggestion? I created a call builder.CreateCall2(foo, p1, p2) in a module. foo is a Function* generated by module->getOrInsertFunction("foo", prototype). foo is defined outside of this module, and in the dump of the module, I see "declare i64 @foo(xxx, xxx)". The error happens during link time, it seems
2010 Aug 19
3
[LLVMdev] using external functions from llvm
...st<unsigned char*>(new > double(args[0].DoubleVal)); > llvm::GenericValue gv; > gv.PointerVal = reinterpret_cast<void*>(result); > return gv; > } > > defined in an extern "C" block. I add it as a symbol with: > > > llvm::sys::DynamicLibrary::AddSymbol("lle_X_create_number_object",(void*)lle_X_create_number_object); > > yet when attempting to call it I still get: "LLVM ERROR: Program used > external function 'create_number_object' which could not be resolved!" > _____________________________________________...
2010 Aug 19
0
[LLVMdev] using external functions from llvm
...pret_cast<unsigned char*>(new double(args[0].DoubleVal)); > llvm::GenericValue gv; > gv.PointerVal = reinterpret_cast<void*>(result); > return gv; > } > > defined in an extern "C" block. I add it as a symbol with: > > llvm::sys::DynamicLibrary::AddSymbol("lle_X_create_number_object",(void*)lle_X_create_number_object); > > yet when attempting to call it I still get: "LLVM ERROR: Program used external function 'create_number_object' which could not be resolved!" > _______________________________________________ &...
2013 Nov 15
3
[LLVMdev] Android JIT patch
...es on static constructors. That causes headaches and is against the LLVM coding standards. >>> My bad, I just ripped off the existing implementation. I guess the JITMemoryManager part is destined to go away along with the JIT. >>>> Third, I don't think sys::DynamicLibrary::AddSymbol() is the right way to go here. I know I have recently suggested using that function, but I was wrong. That function exposes symbols to the entire host program as if they were present in a locally loaded shared library. For some programs that may be acceptable behavior, but it cannot be the defau...
2013 Nov 14
2
[LLVMdev] Android JIT patch
...his relies on static constructors. That causes headaches and is against the LLVM coding standards. >> My bad, I just ripped off the existing implementation. I guess the JITMemoryManager part is destined to go away along with the JIT. >>> Third, I don't think sys::DynamicLibrary::AddSymbol() is the right way to go here. I know I have recently suggested using that function, but I was wrong. That function exposes symbols to the entire host program as if they were present in a locally loaded shared library. For some programs that may be acceptable behavior, but it cannot be the defau...
2015 Mar 20
2
[LLVMdev] LLVM Exception Handling
...ineBuilder factory(std::move(Mod)); factory.setErrorStr(&err); factory.setEngineKind(llvm::EngineKind::JIT); factory.setTargetOptions(Opts); factory.setMCJITMemoryManager(std::move(MemMgr)); llvm::ExecutionEngine* EE = factory.create(); llvm::sys::DynamicLibrary::AddSymbol("_Z4testv", reinterpret_cast<void*>(test)); EE->finalizeObject(); void* poi = EE->getPointerToFunction(f); void (*exec)(void*) = reinterpret_cast<void (*)(void*)>(poi); try { exec(NULL); } catch (int e) { std::cout <&lt...
2013 Nov 14
0
[LLVMdev] Android JIT patch
...wrong, this relies on static constructors. That causes headaches and is against the LLVM coding standards. > My bad, I just ripped off the existing implementation. I guess the JITMemoryManager part is destined to go away along with the JIT. >> Third, I don't think sys::DynamicLibrary::AddSymbol() is the right way to go here. I know I have recently suggested using that function, but I was wrong. That function exposes symbols to the entire host program as if they were present in a locally loaded shared library. For some programs that may be acceptable behavior, but it cannot be the defau...
2018 Apr 26
3
[lld] - LLD (ELF) code covered by test cases.
...low in ICF.cpp and all our tests pass. (https://github.com/llvm-mirror/lld/blob/master/ELF/ICF.cpp#L386) 2) In Relocations.cpp, all code inside `if`: https://github.com/llvm-mirror/lld/blob/master/ELF/Relocations.cpp#L1177 Is not covered by tests. 3) MicroMipsR6Thunk::writeTo(), MicroMipsR6Thunk::addSymbols(), MicroMipsR6Thunk::getTargetInputSection() are not covered. That seems to be all major places I saw in report. Now we probably can think about what we can do with that? * Ideal scenario I can imagine is that we could fix all the places and, for example, setup the watching bot looking for LLD c...
2014 Mar 01
2
[LLVMdev] MCJIT crash on 64 bit Linux, works find on OSX
Hi All. I have an issue when a MCJIT ExecutionEngine is created then deleted, any C++ exception thrown after the MCJIT dtor is called will result in a seg fault. This does not occur with the regular JIT engine, and only occurs on Linux, works fine on OSX. basically its like this: ExecutionEngine *e = engineBuilder.create(); // this is fine try { throw exception()} catch(exception&) {}
2013 Nov 14
0
[LLVMdev] Android JIT patch
...his relies on static constructors. That causes headaches and is against the LLVM coding standards. >> My bad, I just ripped off the existing implementation. I guess the JITMemoryManager part is destined to go away along with the JIT. >>> Third, I don't think sys::DynamicLibrary::AddSymbol() is the right way to go here. I know I have recently suggested using that function, but I was wrong. That function exposes symbols to the entire host program as if they were present in a locally loaded shared library. For some programs that may be acceptable behavior, but it cannot be the defau...
2013 Nov 15
0
[LLVMdev] Android JIT patch
...es on static constructors. That causes headaches and is against the LLVM coding standards. >>> My bad, I just ripped off the existing implementation. I guess the JITMemoryManager part is destined to go away along with the JIT. >>>> Third, I don't think sys::DynamicLibrary::AddSymbol() is the right way to go here. I know I have recently suggested using that function, but I was wrong. That function exposes symbols to the entire host program as if they were present in a locally loaded shared library. For some programs that may be acceptable behavior, but it cannot be the defau...
2018 Apr 26
0
[lld] - LLD (ELF) code covered by test cases.
...pass. > (https://github.com/llvm-mirror/lld/blob/master/ELF/ICF.cpp#L386) > > 2) In Relocations.cpp, all code inside `if`: > https://github.com/llvm-mirror/lld/blob/master/ELF/Relocations.cpp#L1177 > Is not covered by tests. > > 3) MicroMipsR6Thunk::writeTo(), MicroMipsR6Thunk::addSymbols(), > MicroMipsR6Thunk::getTargetInputSection() are not covered. > > That seems to be all major places I saw in report. > > Now we probably can think about what we can do with that? > * Ideal scenario I can imagine is that we could fix all the places and, for example, setup the wa...
2013 Nov 01
0
[LLVMdev] [Proposal] Adding callback mechanism to Execution Engines
...ing something, indeed addGlobalMapping should not work with MCJIT. MCJIT does not consult EEState.getGlobalAddressMap when resolving symbols. Instead it uses RTDyldMemoryManager::getSymbolAddress which checks with DynamicLibrary::SearchForAddressOfSymbol, so Andy's suggestion of DynamicLibrary::addSymbol is better as it should work with both JIT and MCJIT. Another options is to use the LazyFunctionCreator which is implemented in both JIT and MCJIT. Andy - MCJIT::getPointerToFunction does call EE:addGlobalMapping - however EEState.getGlobalAddressMap is not used in MCJIT. Should this call be remov...