Peter Bengtsson wrote:
As far as I understand the dlsym() interface and the AmigaOS 4 interfaces, it should be quite simple to wrap an Amiga library in a dlsym() work-alike. So we could possibly use the dlsym() interface for everything internally.
The code I've written uses elf.library and loads the elf files directly, using their symbol table. Alternate versions could use a pre-defined export table and just provide a single entry that returns a symbol.
Agreed. Using ixemul would be like porting to two OS:es at once. Not that ixemul is bad, just that it adds a lot of complexity and overhead which we do not want. If possible, the OOo port should retain as much as possible of the "Amiga Snappiness".
ixemul also has the drawback of making system programs unstable. AFAIK there are strict rules about making OS calls in an ixemul-using program.
Do not forget the interaction of Posix threads with signals.
As far as POSIX signals are concerned, this might be the biggest obstacle, depending on their usage. This is again an area where we tried to improve things in OS 4 without resorting to hacks like ixemul did on 68k. Still, the definitions of posix threads and signals are, afaik, rather hazy...
We might also want to investigate the thread safety of some functions with regard to the _REENTRANT macro.
clib2 is not at all thread safe, but according to Olaf could be made so (with some effort). newlib could be made thread-safe relatively easy but lacks a lot of signal features that clib2 already has.
Regards,