delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/10/11/08:33:12

Date: Fri, 11 Oct 1996 14:23:12 +0200 (METDST)
From: Robert Hoehne <robert DOT hoehne AT mathematik DOT tu-chemnitz DOT de>
To: "John M. Aldrich" <fighteer AT cs DOT com>
Cc: Bill Currie <billc AT blackmagic DOT tait DOT co DOT nz>, djgpp-workers AT delorie DOT com
Subject: Re: Linker script (Was Re: binutils 2.7 questions)
In-Reply-To: <325DB90E.3B7D@cs.com>
Message-Id: <Pine.HPP.3.91.961011130700.9168D-100000@newton.mathematik.tu-chemnitz.de>
Mime-Version: 1.0

On Thu, 10 Oct 1996, John M. Aldrich wrote:

> AFAIK, Robert just writes the IDE.  DJ's the one responsible for the ld
> script behavior.  :)
I made also the binutils port. But here a question from a German:

What is "AFAIK" ?? I'v searched all my dictionaries for it, but no
success.


Now some remarks from me:

1) The deafult target of ld is overwritten by the 'djgpp.djl' file. That
   means, if you call ld through gcc, the output format is 'coff-go32',
   the raw coff format.
2) The stubify.exe prepends to a coff image a hardcoded stub. That
   means, the environment variable $(STUB), which was mentioned by DJ,
   is used only by the binutils (including ld), when writing the
   'coff-go32-exe' format. Here comes my suggestion to DJ, to change
   the stubify in that way, also to use that variable for determining
   the stub.
3) There is also an other misunderstanding. If you call gcc with
   gcc -o foo foo.c
   there is produced both, the coff image 'foo' and the exe 'foo.exe'
   in the same way like in V 2.00. Remember, that the deafult target
   of ld is used only, if not overwritten on command line or in the
   linker script (which is in DJGPP the case)
4) Until stubify is not changed to use the optional external stub, you
   can use the following to build an exe file with your stub:
   - create the stub (name it mystub or something else)
   - set the environment variable STUB to point to this file
   - link your program with gcc and outputfile without the exe suffix
   - now use objcopy to create the exe (objcopy knows about the 
     STUB variable)
     objcopy --output-target=coff-go32-exe foo foo.exe


> 1) If the user specifies an '.exe' as the output file, ld should call
> stubify and remove the image (current behavior).
> 
> 2) If the user specifies a non-'.exe' as the output file, ld should
> produce the image, but not call stubify.
> 
> 3) If the user doesn't specify an output file, ld should produce both
> a.out and a.exe (current behavior).
>
What you are missing? The only thing, which you want to change, is
in point 2) by not creating the exe file (in addition to the coff
image).

Robert 

- Raw text -


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