Displaying 20 results from an estimated 62 matches for "loadlibrarypermanently".
2019 Aug 27
2
Orc JIT vs. STL
...om> wrote:
>> >
>> > HI
>> > Did you run the static constructor and destructor? How did you make
>> your process symbols visible to ORC jit?
>>
>> Yes. It's the constructor that generates the undefined symbol error.
>> We use DynamicLibrary::LoadLibraryPermanently(nullptr) to add process
>> symbols.
>>
>> > Could you please share us the for what symbols you get undefined
>> references :-)
>>
>> Certainly! Mangled:
>>
>> _ZNSi4swapERSi
>> _ZNSt13basic_filebufIcSt11char_traitsIcEE4swapERS2_
>&...
2019 Aug 27
2
Orc JIT vs. STL
...4:56 PM Praveen Velliengiri
<praveenvelliengiri at gmail.com> wrote:
>
> HI
> Did you run the static constructor and destructor? How did you make your process symbols visible to ORC jit?
Yes. It's the constructor that generates the undefined symbol error.
We use DynamicLibrary::LoadLibraryPermanently(nullptr) to add process
symbols.
> Could you please share us the for what symbols you get undefined references :-)
Certainly! Mangled:
_ZNSi4swapERSi
_ZNSt13basic_filebufIcSt11char_traitsIcEE4swapERS2_
And unmangled:
std::basic_istream<char, std::char_traits<char>
>:...
2009 Jul 23
1
[LLVMdev] Possible change to ExecutionEngine::create()
...ast,
bool EnumModules) {
ExecutionEngine *EE = 0;
if (EnumModules) {
// Make sure we can resolve symbols in the program as well. The zero arg
// to the function tells DynamicLibrary to load the program, not a library.
if (sys::DynamicLibrary::LoadLibraryPermanently(0, ErrorStr))
return 0;
}
...
Your help would be appreciated.
Rob.
2019 Aug 27
4
Orc JIT vs. STL
Greetings, LLVM wizards.
We are using Clang and Orc JIT (v1) to compile and execute C++ code on the
fly. If a C++ module calls functions from external libraries, we add them
via DynamicLibrary::LoadLibraryPermanently().
The problem we have run into recently is when a module calls a function
from the STL -- in particular this swap() function for input streams:
#include <fstream>
std::ifstream stream1, stream2;
stream1.swap(stream2);
When we run the constructors for the module, we get two undefined symbo...
2009 Jul 23
2
[LLVMdev] Possible change to ExecutionEngine::create()
Hi Rob,
Can you comment on exactly what the problem is you want to solve? Is
it a performance issue with LoadLibraryPermanently, or do you simply
not want the external symbols to be resolved from within the JIT?
- Daniel
On Wed, Jul 22, 2009 at 11:22 PM, Evan Cheng<evan.cheng at apple.com> wrote:
>
> On Jul 22, 2009, at 9:43 PM, Rob Grapes wrote:
>
>> Hi,
>>
>> Would it be possible to mak...
2009 Jul 23
0
[LLVMdev] Possible change to ExecutionEngine::create()
...bool EnumModules) {
> ExecutionEngine *EE = 0;
> if (EnumModules) {
> // Make sure we can resolve symbols in the program as well. The
> zero arg
> // to the function tells DynamicLibrary to load the program, not
> a library.
> if (sys::DynamicLibrary::LoadLibraryPermanently(0, ErrorStr))
> return 0;
> }
> ...
>
> Your help would be appreciated.
>
> Rob.
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/...
2016 May 22
1
External function resolution: MCJIT vs ORC JIT
>> llvm::sys::DynamicLibrary::LoadLibraryPermanently(nullptr)
This is one is a bit tricky and hard to find.
I spent quiet some time digging into MC and ORC JIT execution engines trying to find what makes them work.
The problem is that this trick (LoadLibraryPermanently) happens inside of EngineBuilder, despite that the functionality belongs to a JIT...
2009 Jul 23
0
[LLVMdev] Possible change to ExecutionEngine::create()
...v-bounces at cs.uiuc.edu] On Behalf Of Daniel Dunbar
Sent: Thursday, 23 July 2009 6:35 p.m.
To: LLVM Developers Mailing List
Subject: Re: [LLVMdev] Possible change to ExecutionEngine::create()
Hi Rob,
Can you comment on exactly what the problem is you want to solve? Is
it a performance issue with LoadLibraryPermanently, or do you simply
not want the external symbols to be resolved from within the JIT?
- Daniel
On Wed, Jul 22, 2009 at 11:22 PM, Evan Cheng<evan.cheng at apple.com> wrote:
>
> On Jul 22, 2009, at 9:43 PM, Rob Grapes wrote:
>
>> Hi,
>>
>> Would it be possible to mak...
2016 May 19
2
External function resolution: MCJIT vs ORC JIT
...work on Windows?
-- lg
> On May 18, 2016, at 1:52 PM, Lang Hames <lhames at gmail.com> wrote:
>
> Hi Larry,
>
> You're basically there, but you're hitting a couple of subtle issues:
>
> (1) On both platforms you'll want to call llvm::sys::DynamicLibrary::LoadLibraryPermanently(nullptr) at program startup. This makes exported symbols in the main program searchable by RTDyldMemoryManager::getSymbolAddressInProcess (important for making 'sqr' findable on any platform).
>
> (2) On Linux (if I understand correctly) symbols aren't exported from the main proc...
2016 May 20
0
External function resolution: MCJIT vs ORC JIT
...s?
>
> -- lg
>
> On May 18, 2016, at 1:52 PM, Lang Hames <lhames at gmail.com> wrote:
>
> Hi Larry,
>
> You're basically there, but you're hitting a couple of subtle issues:
>
> (1) On both platforms you'll want to call
> llvm::sys::DynamicLibrary::LoadLibraryPermanently(nullptr) at program
> startup. This makes exported symbols in the main program searchable by
> RTDyldMemoryManager::getSymbolAddressInProcess (important for making 'sqr'
> findable on any platform).
>
> (2) On Linux (if I understand correctly) symbols aren't exported from...
2009 Jun 15
1
[LLVMdev] runtime library for jitted code
Albert and Anton, thanks for all the answers.
I tried to load a DLL with DynamicLibrary::LoadLibraryPermanently and it
works perfectly, so there is no need to use
ExecutionEngine::addGlobalMapping. However Function objects still need to be
constructed since they are required when creating a call, right?
Victor
2009/6/15 Albert Graef <Dr.Graef at t-online.de>
> Victor Zverovich wrote:
> > I...
2008 Mar 12
1
[LLVMdev] [PATCH] Get dlerror() messages
Hello,
Attached is a simple fix for getting error messages from dlerror in
LoadLibraryPermanently. The current code modifies the value of a pointer
that is passed by value, so the caller never gets the message.
Hope this helps,
Julien
--
Julien Lerouge
PGP Key Id: 0xB1964A62
PGP Fingerprint: 392D 4BAD DB8B CE7F 4E5F FA3C 62DB 4AA7 B196 4A62
PGP Public Key from: keyserver.pgp.com
------------...
2008 Jul 09
2
[LLVMdev] Add RTLD_GLOBAL to dlopen
...whereas the second one provides
extra passes which make use of the first library's support code. In
other words, the symbols loaded in for the first library should be
available when the second library is loaded.
In LLVM 2.1, this approach worked, but I noticed that the
DynamicLibrary::LoadLibraryPermanently(...) implementation in $LLVM/
lib/System/DynamicLibrary.cpp has been altered for LLVM 2.3. The
rewrite does not make loaded symbols available for future loaded
libraries.
Changing on line 64:
void *H = dlopen(Filename, RTLD_LAZY);
... into ...
void *H = dlopen(Filename, RTLD_LAZY | RTLD_GL...
2012 Apr 29
1
[LLVMdev] Running LLVM JIT on qemu-system-arm
...ectory
afaik, this error is related to lli using dlopen() with a NULL path to
resolve symbols for the main program (lli program) itself. This happens when
lli initially tries to create an ExecutionEngine ("EE = builder.create();"
in lli.cpp), which leads to "if
(sys::DynamicLibrary::LoadLibraryPermanently(0, ErrorStr)" in
ExecutionEngine.cpp.
Could anyone tell me how to resolve this?
Thanks in advance!
Toan Mai.
--
View this message in context: http://old.nabble.com/Running-LLVM-JIT-on-qemu-system-arm-tp33763272p33763272.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
2009 Jul 23
2
[LLVMdev] proposed new rule for getelementptr
On Jul 22, 2009, at 5:23 PM, Chris Lattner wrote:
>
> On Jul 22, 2009, at 1:32 PM, Dan Gohman wrote:
>
>>>>
>>>> - A null pointer is associated with no addresses.
>>>>
>>>
>>> A null pointer in address space 0.
>>
>> I'm not fond of weird address-space semantics, but for consistency
>> with what the optimizer is
2014 Apr 04
2
[LLVMdev] Weird problems on calling an external function from MCJIT on Windows(mingw)
...to make no difference: "LLVM ERROR: Program used external function
'_a_outside_func' which could not be resolved!".
.............
After a day's wasting I unconsciously packed my external function
"a_outside_func" into a shared object,called
llvm::sys::DynamicLibrary::LoadLibraryPermanently("ext_func.so"); at the
beginning of the program and named the function "_a_outside_func" in the IR.
OMG IT WORKS THEN?!
So I'd like to ask why llvm cant resolve my external function from the
program itself(in fact i dont get such problems on linux)?
-------------- next part...
2018 Jun 28
2
Since MCJIT I can't get libm functions to work
...9;t need any additional linker flags. Very nice.
Thanks,
Frank
On 06/28/2018 04:38 PM, Alex Denisov wrote:
> Hi Frank,
>
> If I am not mistaken it doesn't look in the whole process space by default.
> Please, try loading all the symbols explicitly:
>
> sys::DynamicLibrary::LoadLibraryPermanently(nullptr);
>
> If it doesn't help, then you may try compiling your host program with -rdynamic, otherwise dlsym may not see all the symbols. At least it was the case for me on Linux.
>
> I hope it helps.
>
> Cheers,
> Alex.
>
>> On 28. Jun 2018, at 21:40, Frank Wint...
2014 Apr 04
2
[LLVMdev] Weird problems on calling an external function from MCJIT on Windows(mingw)
...sed external function
> > '_a_outside_func' which could not be resolved!".
> > .............
> > After a day's wasting I unconsciously packed my external function
> > "a_outside_func" into a shared object,called
> > llvm::sys::DynamicLibrary::LoadLibraryPermanently("ext_func.so"); at the
> > beginning of the program and named the function "_a_outside_func" in the
> IR.
> > OMG IT WORKS THEN?!
> > So I'd like to ask why llvm cant resolve my external function from the
> > program itself(in fact i dont get such...
2006 May 09
1
[LLVMdev] Memory leaks in LLVM
...n@@GLIBC_2.1 (in /lib/libdl.so.2)
==10132== by 0x87076FC: sys_dl_open ( ltdl.c:1110)
==10132== by 0x8707F75: tryall_dlopen (ltdl.c:2431)
==10132== by 0x8709500: try_dlopen (ltdl.c:3374)
==10132== by 0x87096A8: lt_dlopen (ltdl.c:3420)
==10132== by 0x86FE22E:
llvm::sys::DynamicLibrary::LoadLibraryPermanently(char const*) (
DynamicLibrary.cpp:103)
==10132== by 0x86F4599: llvm::PluginLoader::operator=(std::string const&)
(PluginLoader.cpp:31)
==10132== by 0x83D3D79: void llvm::cl::opt_storage<llvm::PluginLoader,
false, true>::setValue<std::string>(std::string const&) ( CommandLi...
2015 Aug 20
2
Linking existing functions from JITed code
...at adding support for this.
- Lang.
On Fri, Aug 14, 2015 at 7:38 AM, Andy Somogyi <andy.somogyi at gmail.com>
wrote:
> After some fiddling with it, it does in fact look like it works as you
> describe Lang.
>
> The trick was you had to call
>
> llvm::sys::DynamicLibrary::LoadLibraryPermanently(nullptr);
>
> to add the currently running process before calling
>
> llvm::RTDyldMemoryManager::getSymbolAddressInProcess(name);.
>
> Also, all of the function needs to be declared as extern C to avoid name
> mangling.
>
> I however think that adding the addGlobalMapping...