Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 04 Oct 1996 17:01:46 -0600
From:      Warner Losh <imp@village.org>
To:        "Boatwright, Charles" <Charles_Boatwright@cisnc.canon.com>
Cc:        "'FreeBSD Hackers'" <freebsd-hackers@FreeBSD.org>
Subject:   Re: x86 COFF with FreeBSD 
Message-ID:  <199610042301.RAA17923@rover.village.org>
In-Reply-To: Your message of "Fri, 04 Oct 1996 14:41:10 PDT." <c=US%a=_%p=Canon_Informatio%l=CISNCDC-961004214110Z-618@cisncdc.canon.com> 
References:  <c=US%a=_%p=Canon_Informatio%l=CISNCDC-961004214110Z-618@cisncdc.canon.com>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message
<c=US%a=_%p=Canon_Informatio%l=CISNCDC-961004214110Z-618@cisncdc.canon.com>
"Boatwright, Charles" writes: 
: Knowledge of problem.
: 	Used cygnus tool chain on X86-cygwin32 to begin BFD - COFF research.
: 	No success.
: 
: Does anyone know how this can be done, or can it be done????

Here's a place to look....

build the binutils like so:

./configure --enable-targets=i386-cygwin32-winnt,i386-unknown-freebsd2.1
make

this will (unless I've fumbled fingered or forgotten the right forms
for the tarets) enable the building of a binutils that groks the
cygwin stuff and the freebsd stuff.  Bascially, you need valid target
names here, and I don't recall off the top of my head the cygwin
target name.

Then use ar to extract the .o's from this library.

Then use objcopy to convert the .o's from the ms COFF format to
FreeBSD's a.out format.

However, if this isn't compatible with the cygwin stuff, I'm not sure
what you can do.  There may be other targets that grok this target
(from the DOS world no doubt).

You may have problems with things like structure sizes and padding.
Also, you may have real mode vs protected mode (I hope I got the names
right) opcode encoding, which I seem to recall might be a problem (and
if not, then please let me know).  You may also have near/far issues
to deal with as well.

Hmmm, maybe the best way to do this would be to use a disassembler
that read in the MS library and produced .s files that FreeBSD's gas
would grok.  Don't know if objdump + glue would do this or not.

Anyway, this will give you some things to dig around in :-).

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610042301.RAA17923>