This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: problems linking formats.


I agree with your point about PE being COFF.  M$ finally admitted it, 
however, the format keeps changing!!!!!!  M$ continually adds segments.
In my mind (what little there is) a constantly "moving" and unpublished 
standard  (M$ requires money, i.e. MSDN) for their docs (except the docs
on the web), and the have published the format reluctantly, this makes 
M$, not the format a  ba***rd......  ;-(

Do you have any experience with the problem previously mentioned?

Here is some more information..

We have found that the calling addresses for MSVC 4.2 compiled object
"off" by four bytes.    I am intentionally vague and inaccurate about
process here, the exact details can be forwarded, however, my 
boss wants me to produce some code this week  ;-).


image foo() in foo.obj

objdump reports the address of foo as 0x1f30, the code (when
has the (relative address translated) 0x1f34.  

I am still exploring this, but perhaps you can tell me, are there any
details in and send-pr reports which might help?

I am guessing that the problem is somewhere in the backend, since 
objcopy can't copy pe to aout and maintain the relocation records.


disclaimers:  I am not representing anything except my stomach!

MS Exchange is a frustratingly miserable mail package!

>From: 	Kim Knuttila[]
>Sent: 	Tuesday, March 25, 1997 7:36 PM
>Cc: 	Boatwright, Charles;
>Subject: 	Re: problems linking formats.
>   From: Tim Iverson <>
>   Date: Mon, 24 Mar 1997 17:54:39 -0800 (PST)
>   Cc:
>   X-Mailer: ELM [version 2.4 PL25]
>   MIME-Version: 1.0
>   Content-Type: text/plain; charset=US-ASCII
>   Content-Transfer-Encoding: 7bit
>   Sender:
>   Precedence: bulk
>   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.
>   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
>   and FAQs and saw nary a reference to executable or object format;
>   does somewhat imply "Microsoft Portable Executable" format, often referred
>   to as "PE", but it would be nice if it was explicitly stated.
>You're missing some info. The 'pe' does refer to "Portable Executable". This 
>is Microsoft's extension to COFF and it is the official format for
>(There's tons of info on the MS Developer CD's, etc) Far from a 'bastard
>you can think of PE as the replacement for OMF. There are PE formats defined
>for i386, powerpc, alpha and mips (and probably others by now).
>Kim Knuttila     | Speaking for himself as always.
>Cygnus Solutions |		Woof.
For help on using this list, send a message to
"" with one line of text: "help".

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]