www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/01/19/09:00:42

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: "Matthew Smith" <matt AT the-good-stuff DOT freeserve DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Linker script
Date: Sat, 19 Jan 2002 13:47:48 -0000
Lines: 37
Message-ID: <a2btkj$meq$1@newsg2.svr.pol.co.uk>
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" <rzhevskiy AT hetnet DOT nl> 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/









- Raw text -


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