[fpc-devel]My Linklib again

XHajT03 at mbox.vol.cz XHajT03 at mbox.vol.cz
Sat Mar 3 13:17:28 CET 2001


To:             	fpc-devel at deadlock.et.tudelft.nl
Organization:   	Sechenov Institute of Evolutionary Physiology and
   	Biochemistry, Russian Academy of Science
From:           	pavel at insect.mail.iephb.ru (Pavel V. Ozerski)
Date sent:      	Thu,  1 Mar 2001 12:11:04 +0300 (MSK)
Subject:        	Re: [fpc-devel]My Linklib again
Send reply to:  	fpc-devel at deadlock.et.tudelft.nl

> I tried to make some things which must allow porting this patch also
> to OS/2 target (but I did not write OS/2 support because I have no
> OS/2 on my computer).

 I'll be glad to test it for you.

> Therefore I have several questions about OS/2
> target: 1) does loading OS/2 dlls work now?

 Yes, of course - we couldn't access the OS libraries otherwise, i.e. 
we could do nothing.

> 2) Is the "unbinding" from EMX planned?

 Yes, it is, definitely. There are two stages involved:
1) Get things linked without the EMX linker.
2) Change the RTL to not use EMX any more.

 Fortunately, this doesn't have to occur at the same time, because 
the EMX runtime support is a regular DLL under OS/2, so it can be 
used with any linker. For 2), we'd need to have support for 16-bit 
far Pascal calling convention (with automatic thunking like VP/2 
does), because the text mode support only has 16-bit interface 
libraries (compatible to OS/2 1.x; the real code is 32-bit of 
course).

> BTW, Watcom C is preparing to become an open source. I
> don't know, but may be, its linker can support OS/2 target?

 Yes, it can. The main trouble is that GNU AS creates AT&T object 
files, whereas most linkers except GNU need Intel OMF. OS/2 ships 
with its own linker (LINK386) - although this one is quite slow, it's 
still pretty usable. That one of Watcom would be better though, 
because it's cross-platform.

 There are at three ways to get Intel OMFs. First, get a binary 
writer for this format in the compiler. This would be the best, but 
impossible for me, because I know nothing about such things. Second, 
assemble with GNU AS as it's done now, but convert the created object 
files with emxomf conversion tool. I didn't succeed with this yet - I 
converted all object files (including loaders), but LINK386 didn't 
want to link them. Third, get it assembled with NASM or some other 
assembler with OMF output. I didn't try this yet.

 Anyway, my main problem is to find free time for experimenting with 
this. :-(

Tomas





More information about the fpc-devel mailing list