linux-mips-fnet
[Top] [All Lists]

Re: Calling testers for another Dead Function Optimisation update

To: Graham Stoney <greyham@research.canon.com.au>
Subject: Re: Calling testers for another Dead Function Optimisation update
From: Jamie Lokier <lk@tantalophile.demon.co.uk>
Date: Wed, 17 May 2000 12:52:53 +0200
Cc: Dan Malek <dan@netx4.com>, linux-kernel@vger.rutgers.edu, linux-m68k@lists.linux-m68k.org, linux-alpha@vger.rutgers.edu, linux-mips@fnet.fr, sparclinux@vger.rutgers.edu, linuxppc-dev@lists.linuxppc.org, linux-embedded@waste.org
In-reply-to: <20000516020716.EF7F43C95E@elph.research.canon.com.au>; from greyham@research.canon.com.au on Tue, May 16, 2000 at 12:07:16PM +1000
References: <391EECB7.2F5670E7@netx4.com> <20000516020716.EF7F43C95E@elph.research.canon.com.au>
Graham Stoney wrote:
> > This is the way the kernel used to be, with the kernel objects
> > as *.a files instead of *.o files.
> 
> I'm definitely with you on this one. Using ld -r in intermediate
> stages is defeating the linker's natural ability to exclude unused
> objects. My patch achieves a similar effect by allowing the linker to
> exclude unused functions, but it does so in a very torturous way. I'd
> prefer to have both .a's for wholesale dead object elimination _and_
> -ffunction-sections for elimination of any remaining dead functions.

OTOH .a's are slower than ld -r.  They don't save any I/O: all the
enclosed object files have to be duplicated until the final link anyway.
ld -r removes duplicate symbols and debugging information, which makes
the .o files smaller than the corresponding .a files and faster to read.

Using .a _and_ -ffunction-sections at the same time would surely be the
worst possible combination.

-- Jamie

<Prev in Thread] Current Thread [Next in Thread>