From: "Ilya P. Ryzhenkov" 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: Reply-To: ilya AT spy DOT isp DOT nsc DOT ru NNTP-Posting-Host: arab.isp.nsc.ru Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit 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