From mint-bounce@lists.fishpool.fi  Tue May 18 09:52:55 2010
X-Virus-Scanned: amavisd-new at mnet-online.de
From: Andreas Schwab <schwab@linux-m68k.org>
To: Miro Kropacek <miro.kropacek@gmail.com>
Cc: MiNT Mailing List <mint@lists.fishpool.fi>
Subject: Re: [MiNT] a.out linking
References: <AANLkTik3liG1qeThZUmS3SltRsP61RGRMSHLfEJONgFc@mail.gmail.com>
X-Yow: I have many CHARTS and DIAGRAMS..
Date: Tue, 18 May 2010 15:50:38 +0200
In-Reply-To: <AANLkTik3liG1qeThZUmS3SltRsP61RGRMSHLfEJONgFc@mail.gmail.com>
	(Miro Kropacek's message of "Tue, 18 May 2010 15:06:46 +0200")
Message-ID: <m3y6fh5nf5.fsf@hase.home>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-ecartis-version: Ecartis v1.0.0
Sender: mint-bounce@lists.fishpool.fi
Errors-to: mint-bounce@lists.fishpool.fi
X-original-sender: schwab@linux-m68k.org
Precedence: bulk
List-help: <mailto:ecartis@lists.fishpool.fi?Subject=help>
List-unsubscribe: <mailto:mint-request@lists.fishpool.fi?Subject=unsubscribe>
List-Id: <mint.lists.fishpool.fi>
X-List-ID: <mint.lists.fishpool.fi>
List-subscribe: <mailto:mint-request@lists.fishpool.fi?Subject=subscribe>
List-owner: <mailto:tjhukkan@fishpool.fi>
List-post: <mailto:mint@lists.fishpool.fi>

Miro Kropacek <miro.kropacek@gmail.com> writes:

> What I don't understand is why when I link "m68k-atari-mint-gcc -o out
> a.o b.o c.o" I get bigger result than "m68k-atari-mint-gcc -o out a.o
> c.o". I understand a.out is unable to separate files into more than
> one text section but why on earth, when whole file (in our case with
> only one function) is unused, linker just didn't skip it?

Object files passed to the linker are always linked in.  Use an archive
if you want link-if-referenced semantics.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


