Hi, Today, I've made the transition from LLVM 2.1 to 2.3. I invoke opt with two dynamic libraries to "-load", the first of which contains transformation passes and support code 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_GLOBAL); fixes this. Could this change be incorporated into future releases? Thanks in advance! Kind regards, Bram Adams GH-SEL, INTEC, Ghent University (Belgium)
On Wed, 9 Jul 2008, Bram Adams wrote:> Today, I've made the transition from LLVM 2.1 to 2.3. I invoke opt > with two dynamic libraries to "-load", the first of which contains > transformation passes and support code 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.Sure, applied: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080707/064842.html -Chris> 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_GLOBAL); > > fixes this. Could this change be incorporated into future releases? > Thanks in advance! > > Kind regards, > > Bram Adams > GH-SEL, INTEC, Ghent University (Belgium) > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-Chris -- http://nondot.org/sabre/ http://llvm.org/
Hi, Op 10-jul-08, om 02:58 heeft Chris Lattner het volgende geschreven:> Sure, applied: > http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080707/064842.htmlThanks! Kind regards, Bram Adams GH-SEL, INTEC, Ghent University (Belgium)
Reasonably Related Threads
- [LLVMdev] Add RTLD_GLOBAL to dlopen
- dlopen RTD_LAZY and RTLD_GLOBAL
- [LLVMdev] dyld: lazy symbol binding failed: fast lazy bind offset out of range
- [LLVMdev] dyld: lazy symbol binding failed: fast lazy bind offset out of range
- [LLVMdev] dyld: lazy symbol binding failed: fast lazy bind offset out of range