X-Originating-Host: 63.21.240.254 Organization: http://www.remarq.com: The World's Usenet/Discussions Start Here Subject: Re: MASM coff images Lines: 69 From: Dogansmoobs Newsgroups: comp.os.msdos.djgpp Message-ID: <097c68c0.5c25a710@usw-ex0103-023.remarq.com> References: <04039b30 DOT 28983095 AT usw-ex0101-008 DOT remarq DOT com> <39301ea2 DOT 9896444 AT news DOT freeserve DOT net> Bytes: 2504 X-Wren-Trace: eODF7ez1svizpPvv5K7y5P388vbF7K/i6O3m76f39q2vsPOvvPG7vLixqre79A== Date: Sat, 27 May 2000 13:00:14 -0700 NNTP-Posting-Host: 10.0.2.23 X-Complaints-To: wrenabuse AT remarq DOT com X-Trace: WReNphoon4 959457705 10.0.2.23 (Sat, 27 May 2000 13:01:45 PDT) NNTP-Posting-Date: Sat, 27 May 2000 13:01:45 PDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Are you sure that the coff image output by masm is of a differant format used by gcc? Because it says on section 17.2 of the djgpp faq about converting INTEL to AT&T syntax that using masm is an alternative. From the djgpp FAQ section 17.2: * Obtain a copy of Microsoft MASM 6.11. It has a -coff option to generate object code in COFF format which can be submitted to GCC, so you can compile your original source. This section also goes on to explain how to convert .obj files to coff files, but I would like to avoid that if at all possible to simplify things a little better (easier to write makefiles, etc). If the coff files are not of the same format, I sugest that the wording the frequently asked questions should be changed to avoid further confusion. - Dogansmoobs The grape moos hotly In article <39301ea2 DOT 9896444 AT news DOT freeserve DOT net>, dontmailme AT iname DOT com (Steamer) wrote: >Dogansmoobs wrote: > >>I have a lot of code written a while ago when I used MASM that I >>would not like to lose. I read that you could compile a MASM >>source to a coff image, which I figured out how to do. I try to >>write a C program to call the asm functions, but no matter what >>I try, I still get undefined refrence to [function]. > >Unfortunately, Microsoft's COFF is not the same as DJGPP's COFF, >so there's no hope of this working. If you want to use assembly >language with DJGPP you really have to use either NASM or Gas. > >>I am getting the impression from the FAQ that this is not done >>all that often, but I would hate to convert all my code int AT&T >>syntax. Any help at all would be appreciated, or any advice on >>where else to ask this question if no one here could help me >>would be good too. > >Converting to NASM syntax would probably be easier than converting >to Gas (AT&T) syntax. > >Alternatively, it should be possible to write an MS-COFF-to- DJGPP-COFF >converter, especially as the two formats are so similar. Obviously >this would not be a particularly trivial undertaking, but it might be >easier than converting all your asm source code (depending on how much >there is and how un-NASM-like your MASM coding style is). See the >comments in the file outcoff.c in the NASM sources for a list of the >differences between the two types of COFF. > >S. > > * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network * The fastest and easiest way to search and participate in Usenet - Free!