delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/04/17/16:31:41

From: "Tom Hunt" <thunt1 AT falcon DOT lhup DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Using MASM generated COFF files with GPP (solution)
Date: Tue, 17 Apr 2001 15:57:58 -0400
Organization: East Stroudsburg University, Pennsylvania
Lines: 27
Message-ID: <9bi7g8$tbe$1@jake.esu.edu>
References: <9bflht$l1$1 AT jake DOT esu DOT edu> <q9UC6.10182$cf5 DOT 1028488 AT news6-win DOT server DOT ntlworld DOT com>
NNTP-Posting-Host: thunt1.lhup.edu
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Is there a way to tell if an object file was generated by MASM?  I think I
remember seeing in some debug dumps a tag that says "Microsoft Assembler"
and stuff like that.  Maybe the linker itself could search for this tag and
apply
the patch if it needs to.

Tom

"Lawrence Rust" <lvr AT NOsoftSPsystemAM DOT co DOT uk> wrote in message
news:q9UC6.10182$cf5 DOT 1028488 AT news6-win DOT server DOT ntlworld DOT com...
> 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.  I wrote a simple utility to do this which can be
downloaded
> (with C source) from www.softsystem.co.uk/masm2djg.zip



- Raw text -


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