This is the mail archive of the cygwin 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]
Other format: [Raw text]

Mixing MASM and GCC/GAS generated objects - Cygwin vs. Linux


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 <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
________________________________________________________________
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/


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