Subject: Re: problems linking formats.
From: [email-masked] (Tim Iverson)

24 Mar 1997 22:36:47 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Original-To: [email-masked] (Boatwright Charles)
Original-Cc: [email-masked]
In-Reply-To: <c=US%a=_%p=Canon_Informatio%l=[email-masked]> from "Boatwright, Charles" at Mar 21, 97 12:30:37 pm
X-Mailer: ELM [version 2.4 PL25]
Original-Sender: [email-masked]

I'm unsure about the latest MSVC, but I do know that MSC, Borland, etc.
(all older Windows/DOS compilers) use Intel OMF, not "pe-i386", which I
believe is an executable format, not an object format.  According to the
Cygnus GCC-b17.1 source, pe-i386 assumes that the object module format is
actually a variation on COFF.

MSC did at one time support SCO's variation on COFF, which may be similar
enough to what GCC uses such that MSVC's link.exe will link without error
messages, but use incorrect offsets.  I have seen the incorrect offsets
problem with GCC-b17.1 and Phar-Lap's linker, which does support COFF.  So,
I'm inclined to believe that pe-i386 is not COFF enough to be useful
outside of GCC.

IMHO, if Cygnus wants a drop-in replacement for a production toolset, they
will need to support OMF at some point.  However, given that GNU doesn't
support it, using a bastard COFF during beta does provide a workable
solution until OMF support is ready.

I do wish it was better documented, though.  I looked all over the README's
and FAQs and saw nary a reference to executable or object format; "pe-i386"
does somewhat imply "Microsoft Portable Executable" format, often referred
to as "PE", but it would be nice if it was explicitly stated.

BTW, on another note, the standard b17.1 distribution doesn't even come
close to building itself under Windows '95.  Is everyone building under NT
or Unix (most of the problems seem to be bugs in bash)?  Is there a long
list of caveats someplace?  There is absolute no documentation in the 'all'
tarball -- gotta scrounge around for it on the web site.

- Tim Iverson
  [email-masked]


+----------------
| From: "Boatwright, Charles" <[email-masked]>
| To: "[email-masked]'" <[email-masked]>
| Subject: problems linking formats.
| Date: Fri, 21 Mar 1997 12:30:37 -0800
....
| the result is that we have a compiler which targets aout-i386, and can
| read aout-i386 and pe-i386
....
| We have a library, built with MSVC 4.x  object code ONLY  :-@
| We need to link this to an aout-i386 format target (same cpu, different
....
| always supported a.out well, however pe-i386 support was not all there,
| or not easy to find.
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".