Displaying 6 results from an estimated 6 matches for "lt_dlhandl".
Did you mean:
lt_dlhandle
2007 Jul 20
2
[LLVMdev] Trouble Resolving Objective-C Symbols in lli
...'s lib/System package. That package implements
> this using the libtool "ltdl" library, which presumably gets this
> right in an operating system correct way.
Presumably?
http://www.gnu.org/software/libtool/manual.html#index-lt_005fdlsym-167
says:
Function: lt_ptr lt_dlsym(lt_dlhandle handle, const char *name)
Return the address in the module handle, where the symbol given
by the null-terminated string name is loaded. If the symbol
cannot be found, NULL is returned.
And lt_dlerror() also appears to have the same behaviour as its non-lt_
counterpart, s...
2007 Jul 20
0
[LLVMdev] Trouble Resolving Objective-C Symbols in lli
...implements
> > this using the libtool "ltdl" library, which presumably gets this
> > right in an operating system correct way.
>
> Presumably?
> http://www.gnu.org/software/libtool/manual.html#index-lt_005fdlsym-167
> says:
>
> Function: lt_ptr lt_dlsym(lt_dlhandle handle, const char *name)
>
> Return the address in the module handle, where the symbol given
> by the null-terminated string name is loaded. If the symbol
> cannot be found, NULL is returned.
>
> And lt_dlerror() also appears to have the same behaviour...
2007 Jul 20
4
[LLVMdev] Trouble Resolving Objective-C Symbols in lli
Hi Chris,
> Once you have that, you are hitting another problem. Specifically,
> the JIT::getPointerToNamedFunction method in
> lib/ExecutionEngine/JIT/Intercept.cpp just does a dlsym on missing
> symbols. If dlsym returns null, you get the error message.
>
> The problem here is that .objc_class_name_* are special symbols that
> are used by the objc linker support and they
2007 Jul 20
0
[LLVMdev] Trouble Resolving Objective-C Symbols in lli
On Fri, 20 Jul 2007, Ralph Corderoy wrote:
> I could be missing something, but shouldn't the use of dlsym() be
> The authors of dlsym() realised the return value was overloaded AFAICS.
Yep, patches welcome :)
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
2007 Jul 20
0
[LLVMdev] Trouble Resolving Objective-C Symbols in lli
Hi Ralph,
On Fri, 2007-07-20 at 10:38 +0100, Ralph Corderoy wrote:
> Hi Chris,
> I could be missing something, but shouldn't the use of dlsym() be
>
> char *err;
> void *p;
>
> if ((err = dlerror())) {
> error("earlier undetected dlerror: %s\n", err);
> }
> p = dlsym(handle, sym);
> if ((err = dlerror())) {
>
2007 Jul 20
2
[LLVMdev] Trouble Resolving Objective-C Symbols in lli
...==================
--- DynamicLibrary.cpp (revision 40112)
+++ DynamicLibrary.cpp (working copy)
@@ -130,11 +130,19 @@
if (I != g_symbols.end())
return I->second;
+ // Clear the error status of the ltdl library
+ lt_dlerror();
+
// Now search the libraries.
for (std::vector<lt_dlhandle>::iterator I = OpenedHandles.begin(),
E = OpenedHandles.end(); I != E; ++I) {
lt_ptr ptr = lt_dlsym(*I, symbolName);
- if (ptr)
+
+ // Get the error for the lt_dlsym call. If there was no error and
the result
+ // from lt_dlsym was 0 then 0 is the address of the symbol, no...