delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/04/17/06:32:10

Date: Tue, 17 Apr 2001 14:34:04 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp AT delorie DOT com
Subject: Re: Using MASM generated COFF files with GPP (solution)
In-Reply-To: <q9UC6.10182$cf5.1028488@news6-win.server.ntlworld.com>
Message-ID: <Pine.SUN.3.91.1010417142859.12338A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Tue, 17 Apr 2001, Lawrence Rust wrote:

> There's a couple of extra wrinkles to this though.  Microsoft and GNU differ
> about the format of relocation records in COFF files.  As a result of this:
> 
> 1. A call to an external subroutine from the assembler code is incorrectly
> fixed up by ld (the linker).
> 
> 2. References to local static data are incorrectly fixed up by ld.
> 
> To overcome these problems the COFF file produced by MASM must be patched
> before linking.

Then how come Tom's program worked?

I'm hearing these two different types of reports for quite some time 
now.  Some people tell that they can link MASM-produced COFF object files 
with no problems, others tell that the relocations are wrong and must be 
patched manually.  It almost sounds as if there are two different 
versions of MASM out there.

Perhaps someone could set the record straight once and for all.

TIA

> I wrote a simple utility to do this which can be downloaded
> (with C source) from www.softsystem.co.uk/masm2djg.zip

Please consider uploading it to DJ Delorie's server (see section 22.8 of 
the DJGPP FAQ for the details), so that your utility could be put on 
SimTel.NET mirrors, where all DJGPP users could easily get it, even if 
your home page somehow becomes invalid.  Thanks.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019