From owner-freebsd-hackers Fri Oct 4 16:05:10 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA28493 for hackers-outgoing; Fri, 4 Oct 1996 16:05:10 -0700 (PDT) Received: from rover.village.org (rover.village.org [204.144.255.49]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id QAA28100 for ; Fri, 4 Oct 1996 16:02:20 -0700 (PDT) Received: from rover.village.org (localhost [127.0.0.1]) by rover.village.org (8.7.6/8.6.6) with ESMTP id RAA17923; Fri, 4 Oct 1996 17:01:46 -0600 (MDT) Message-Id: <199610042301.RAA17923@rover.village.org> To: "Boatwright, Charles" Subject: Re: x86 COFF with FreeBSD Cc: "'FreeBSD Hackers'" In-reply-to: Your message of "Fri, 04 Oct 1996 14:41:10 PDT." References: Date: Fri, 04 Oct 1996 17:01:46 -0600 From: Warner Losh Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk In message "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