This is the mail archive of the
mailing list for the Cygwin project.
Mixing MASM and GCC/GAS generated objects - Cygwin vs. Linux
- From: "Lance Beazley" <lbeazley at pillardata dot com>
- To: <cygwin at cygwin dot com>
- Date: Mon, 13 Aug 2007 17:14:08 -0700
- Subject: Mixing MASM and GCC/GAS generated objects - Cygwin vs. Linux
I have a project which for a variety of reasons requires that I bring
coff object generated by MASM 6.14 together with GCC/GAS generated
Under straight Linux, link immediately chokes on the MASM object files.
Cygwin tools get much further but still fail at the final LD stage.
The LD failure is very cryptic so I'd like to ask if anyone understands
why the Cygwin tools might behave differently from the Linux tools WRT
object file formats and whether anyone can shed some light on the LD
I suspect the BFD package under Cygwin may have been modified to handle
MASM "coff" output but I am surprised the Cygwin loader then has
problems with the Cygwin linker's output so my assumption may be
Microsoft claims MASM 6.14 generates coff output per the spec at:
Though of course at April 1999 levels.
The level of Cygwin tools I am using are
Objdump 2.17.5, GCC 3.4.4, AS 2.17.5, Link 6.9, LD 2.17.5
To get the Cygwin tools to process output as far as they do I had to
force the output format to be pe-i386 as demonstrated by the following
gcc -m32 -O2 -nostdlib -nostartfiles -static -o <TARGET>
-Wl,"--oformat=pe-i386" -T <LD_SCRIPT> <SOURCE_OBJECT>
The failure pops up some time later as follows:
..../i686-pc-cygwin/bin/ld: final link failed: Memory exhausted
Any history or ideas would be greatly appreciated.
Thank you for your time and your knowledge,
Lance Beazley | Associate Architect | Pillar Data Systems
lbeazley at pillardata dot com
Quality is free but only to those willing to pay heavily for it.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html