[LLVMdev] Trouble Resolving Objective-C Symbols in lli

Andy Kitchen agimbleinthewabe at gmail.com
Fri Jul 20 21:56:38 PDT 2007


Hey Reid,

I don't recall who originally asked for help with this, but here's a
> patch that could fix it. Please try this and let me know if it works. If
> so, I'll commit it. The patch isn't complete (it should do something in
> the error condition) but it should allow you to find symbols whose
> address is 0.
>

It was me who was having the issues with Objective-C in the interpreter.

Thankyou, I did try the patch, and it doesn't seem to work, or at least for
my one program. In JIT mode it still segfaults and in interpreter mode it
cannot resolve the
symbol.

I am at my wits end with this problem, the dlopen documentation states that
if it
explicidly fails, it will return a NULL pointer. However it doesn't say
anything about
succeeding with a NULL pointer. If the simple Objective-C program is still
failing, even
when checking if the lt_dlerror() code is set. I see two possibilities:

a) The error code is being set even when the symbol is found and has a 0
address
b) The error is caused by some other problem, maybe further upstream,
indicated by the
fact that the JIT interpreter crashes with a segfault. Because normal
unresolved
symbols will not crash the interpreter even in JIT mode.

I'm using the 2.0 release, and I'm about to get the bleeding edge SVN
version to try,
however my mac is quite slow and will take an hour or two to compile the
source code.

My knowleage of the Obj-C runtime is quite limited and I am new to the LLVM
architecture. So I'm sorry if I can't be of more assistance code wise. But
I'm currently
reading up on both in my spare time.

Andy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070721/bbc490fd/attachment.html>


More information about the llvm-dev mailing list