Subject: Re: port windows CE code onto netbsd
To: David Brownlee <>
From: Kamal R. Prasad <>
List: port-arm
Date: 11/12/2004 20:01:31
David Brownlee wrote:

> On Wed, 3 Nov 2004, Kamal R. Prasad wrote:
>> Alright -thanks for the same. Wine as I understand provides a gui to 
>> handle windows emulation [by intercepting winapi calls]. What I have 
>> is a couple of static libraries developed on windows, but which need 
>> to be called by a higher level application.  The static libraries 
>> contain std C functions like malloc() -and no winapi calls and hence 
>> Wine is not a good fit.  But the question is, how do we integrate 
>> that binary with netbsd code? Note the static libs are in binary form 
>> to protect intellectual property -but if I had the src code, it would 
>> have been 100% portable on netbsd.
I may not have clarified -there are 2 versions of the library.
(1) win CE library that runs on X/scale
(2)  Visual C++ library that runs on Windows XP.

>     If the library really doesn't make any external calls then you
>     should just be able to objcopy to convert it to elf and link it
>     into a NetBSD binary (with a possibly a little glue to match up
>     function calling semantics).
You mean,
# objcopy -I windows_filename -O netbsd_filename

will automatically make it a netbsd usable library?

>     If it makes some external library calls such as malloc() then
>     you need to include another library which provides a 'windows'
>     wrapper to the native version of those functions (if the calling

The external functions called are the std libc functions. Its likely 
that the function prototypes don't change across platforms because of 

>     semantivcs are different) - the PEACE project is a good example of
>     a more complete version of this
This seems to  be a work in progress.

>     Is there no way you could get the vendor to provide the object
>     code in native NetBSD form?
>     Its relatively simple to setup a windows box to compile
>     NetBSD/arm32 binaries. Maybe if you offered to build a toolchain
>     (donwload NetBSD and './ -m evbarm toolchain' :)
>     and asked them to compile the source using it?
Not a v. cooperative/competent vendor.