X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: "Matthew Smith" Newsgroups: comp.os.msdos.djgpp Subject: Re: Linker script Date: Sat, 19 Jan 2002 13:47:48 -0000 Lines: 37 Message-ID: References: <253e56df DOT 0201190432 DOT 78d2741b AT posting DOT google DOT com> NNTP-Posting-Host: modem-872.aerodactyl.dialup.pol.co.uk X-Trace: newsg2.svr.pol.co.uk 1011448275 23002 217.135.9.104 (19 Jan 2002 13:51:15 GMT) NNTP-Posting-Date: 19 Jan 2002 13:51:15 GMT X-Complaints-To: abuse AT theplanet DOT net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Kernel Panic" wrote in message news:253e56df DOT 0201190432 DOT 78d2741b AT posting DOT google DOT com... > I don't know if it's a right place to ask, but anyway.. =) > How do I override the default linker script GCC passes to LD (I mean, > is there a command line option)? I haven't found anything about it in > the info pages. Or is invoking LD manually the only option? $gcc -c foo.c <-produces foo.o $gcc foo.o -lbar.a <- links foo.o with bar.a to produce a.exe $gcc -ofoobar.exe foo.o -lbar.a <- links foo.o with bar.a to produce foobar.exe You can use Gnu make to control this process completely. Read the gcc manual http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_2.html#SEC4 <-- link to section with compile/link options and the Gnu make one. http://www.gnu.org/manual/make/index.html These are also on the DJGPP site. If you download these and you unzip them into your djgpp folder they will be in ($DJDIR)\gnu http://www.delorie.com/gnu/docs/