X-Spam-Check-By: sourceware.org Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: Mixing MASM and GCC/GAS generated objects - Cygwin vs. Linux Date: Mon, 13 Aug 2007 17:14:08 -0700 Message-ID: <562C09A341AA3942A9F70218A5A1BE7006FF4985@caex02.trans.corp> From: "Lance Beazley" To: Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l7E0DppO007879 Hi, 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 object. 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 failure. 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 incorrect. Microsoft claims MASM 6.14 generates coff output per the spec at: http://www.microsoft.com/whdc/system/platform/firmware/PECOFF.mspx 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 cmd line: gcc -m32 -O2 -nostdlib -nostartfiles -static -o -Wl,"--oformat=pe-i386" -T 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 ________________________________________________________________ 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 Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/