[LLVMdev] PowerPC JIT available for testing
Chris Lattner
sabre at nondot.org
Sun Nov 28 10:56:00 PST 2004
On Sun, 28 Nov 2004, Reid Spencer wrote:
> The DynamicLibrary.cpp code is written and I believe it to be complete,
> but it hasn't been tested much (at all). llvm-ld uses it to load its
> plug-in optimization module. The implementation will use ltdl library
> if its available, otherwise it tries to use dlopen/dlsym if they are
> available, otherwise you get a compile time warning and (void*)0 if you
> try to look up a symbol.
Okay, interesting. How hard would it be to replace the DynamicLinker.cpp
functionality with your code?
> I'm not sure about the libtool implementation but it does more than just
> accommodate the platform differences for the interface function names.
> It also makes sure that platform requirements for initialization of the
> loaded module, etc. are taken into account (e.g. static initialization
> of data in the shared object). I don't think we want to re-invent this,
> its nasty stuff. As for whether it solves the lookup of symbols
> starting with __, I'm unsure. You'd have to look at the ltdl
> implementation.
It looks like it uses the darwin dylib interfaces directly instead of
going through the dlsym compatibility layer darwin provides. This might
do exactly what we want.
-Chris
> > On Sun, 28 Nov 2004, Reid Spencer wrote:
> > > FYI .. if you want to see how this works, check out
> > > lib/System/DynamicLibrary.cpp and platform versions of it.
> >
> > Is it an option to use this interface now? How does libtool implement
> > dlsym on darwin if not through the obvious interface? Can we just use
> > whatever it uses?
> >
> > -Chris
> >
> > > On Sun, 2004-11-28 at 10:03, Reid Spencer wrote:
> > > > Well, one of these days we'll be using libltdl (libtool's dynamic
> > > > library support) to make the interface to dynamic libraries consistent,
> > > > somewhat portable, and to get rid of system specific differences like
> > > > this.
> > > >
> > > > Reid.
> > > >
> > > > On Sun, 2004-11-28 at 10:00, Chris Lattner wrote:
> > > > > Hi everyone,
> > > > >
> > > > > This is just a note to mention that the PowerPC JIT is now operational and
> > > > > begging for testing in mainline CVS. There is one known problem (below),
> > > > > but otherwise it works as well as the static PowerPC backend on the test
> > > > > suite.
> > > > >
> > > > > The known problem is that the JIT seems unable to resolve calls to
> > > > > external functions that start with "__", such as __eprintf, __moddi3, etc.
> > > > > This appears to be something funny in the darwin implementation of dlsym
> > > > > (returning null for symbols that are valid if they start with __). If
> > > > > anyone has any ideas of how to make this work, we would love to hear them.
> > > > > :)
> > > > >
> > > > > -Chris
> > > >
> > > > ______________________________________________________________________
> > > > _______________________________________________
> > > > LLVM Developers mailing list
> > > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> > > > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
> > >
> >
> > -Chris
>
-Chris
--
http://llvm.org/
http://nondot.org/sabre/
More information about the llvm-dev
mailing list