ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/30/07:52:49

From: "Ilya P. Ryzhenkov" <ilya AT spy DOT isp DOT nsc DOT ru>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Problem with incremental linking
Date: Sat, 30 Nov 1996 17:36:55 -0800
Organization: Institute of Semiconductor Physics
Lines: 42
Distribution: world
Message-ID: <32A0E137.5532@spy.isp.nsc.ru>
References: <E1MMtv DOT 7Fy AT humbug DOT demon DOT co DOT uk>
Reply-To: ilya AT spy DOT isp DOT nsc DOT ru
NNTP-Posting-Host: arab.isp.nsc.ru
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Dave Hudson wrote:
> The problem I've found is that using "ld" with the "-r" (or "-i") option
> seems to add a number of extra symbols under DJGPP, such as
> "djgpp_first_dtor".  When these incremental files are then linked, the
> link fails with duplicated symbols.  Reading the FAQ I get the impression
> that unless I use "-T/djgpp/lib/djgpp.lnk" I shouldn't be getting any
> interference from the link file, but I'm wondering if that's what may be
> causing my problem?
djgpp.lnk is hardcoded in ld.exe, so you can get rid of it by only
creating
your own mydj.lnk file and linking with -T/djgpp/lib/mydj.lnk
You also should override default target "coff-go32-exe" with
"coff-go32", or
you will get a stubified output.
Here is sample mydj.lnk, which do no additional things with .o files :
------------------------------------------
OUTPUT_FORMAT("coff-go32")
SECTIONS
{
  .text  : {
    *(.text)
  }
  .data  : {
    *(.data)
  }
  .ctor  : {
    *(.ctor)
  }
  .dtor : {
    *(.dtor)
  }
  .bss	:
  {
    *(.bss)
  }
}
---------------------------------------------

							Sincerely yours, Ilya
-----------------------------------------------------------------------------
mailto://ilya AT spy DOT isp DOT nsc DOT ru                           
http://spy.isp.nsc.ru

- Raw text -


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