[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: wine and ELF format?
From:       Ulrich Weigand <weigand () immd1 ! informatik ! uni-erlangen ! de>
Date:       2001-01-29 0:02:44
[Download RAW message or body]


Josh DuBois wrote:

>    How closely is wine tied to the ELF format?  I've (finally! :-) ) got
> the apps in the programs/ dir running on linuxppc, so I tried to scoot
> the code over to OSX just to see what happened. Of course no dlopen on
> OSX ==> no compilation.
>    
>    OSX uses Mach-O binaries, rather than ELF.  A dlopen() "equivelent"
> for Mach-O exists, but I've never called dlopen() in my life, so I'm not
> sure on what criterion to compare them.  Does anyone know, broadly, what
> the hot spots will by trying to make wine use a different shared object
> format?

Well, Wine only needs the basic functionality of dlopen, dlclose, dlsym,
which are rather equivalent to LoadLibrary, FreeLibrary, and GetProcAddress.
Anything that allows some sort of run-time dynamic linking must really
provide this functionality IMO ...  You should be able to implement the
corresponding routines in library/port.c.

There might be some further dependecies to the ELF format, however:
e.g. we rely on the fact that the .init and .fini sections can be
used to implement global constructors / destructors.  (This is not
a feature of the ELF *format*, strictly speaking, but of the way
ELF loading is done by the Linux toolchain and dynamic loader.
OSX probably has something similar.)

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic