From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: linker script ? Date: Thu, 26 Dec 1996 01:31:09 -0800 Organization: Two pounds of chaos and a pinch of salt Lines: 28 Message-ID: <32C245DD.684C@cs.com> References: <59t42d$k31 AT gate DOT sinica DOT edu DOT tw> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp109.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Kuang-Chun Cheng wrote: > > As djgpp FAQ said, the default linker script is c:/djgpp/lib/djgpp.lnk ( > assume djgpp installed at c:/djgpp/). However, the following command gave me > different result: > > ld -Tc:/djgpp/lib/djgpp.lnk -o test1 test.o > ld -o test2 test.o > > test1 is smaller than test2. Could someone explain this? Thanks. The FAQ has not been updated for the latest version of DJGPP. In v2.01, the linker script was changed from 'djgpp.lnk' to 'djgpp.djl' because of naming conflicts with Windows 95 symbolic links. By manually invoking ld with the old linker script, you cause it to use the old definitions instead of the new ones. BTW, you should _never_ call ld manually unless you copy down the exact syntax as used by gcc. There are a number of options that must be specified just so, or your programs will not compile right. -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com | | * Proud user of DJGPP! * | http://www.cs.com/fighteer | | ObJoke: If Bill Gates were a robber, not only would he | | shoot you, but he'd send you a bill for the bullets. | ---------------------------------------------------------------------