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

Re: Calling testers for another Dead Function Optimisation update

To: dan@netx4.com (Dan Malek)
Subject: Re: Calling testers for another Dead Function Optimisation update
From: greyham@research.canon.com.au (Graham Stoney)
Date: Tue, 16 May 2000 12:07:16 +1000 (EST)
Cc: greyham@research.canon.com.au (Graham Stoney), 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: <391EECB7.2F5670E7@netx4.com> from "Dan Malek" at May 14, 2000 02:13:11 PM
Dan Malek writes:
> 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.

> The response I received was the change was due to loadable modules, that
> when you link the kernel as a bunch of *.a files the result is usually
> missing lots of functions that a loadable module may want to call.

Like you, I don't understand the logic behind this either. Any symbol
accessible from a loadable module will have a magic reference thanks to
EXPORT_SYMBOL that will drag it in from the archive.

The only use I can see for using ld -r is while building the loadable modules
themselves, to simplify things for the user by combining modules which would
otherwise contain multiple objects. And I guess this is simply so "insmod"
doesn't have to handle archives directly.

> > I think/hope we're getting close to something that could be accepted into
> > the official kernel now.
> 
> Who gave you that indication?  I wouldn't even try to check any of
> this into the kernel sources based upon past discussions.

I can't check it in myself, but I can ask as many people as possible to test
it. If it works OK, it's got a chance of inclusion in 2.4/2.5. Embedded
systems people who want it can use it as-is on 2.2 too.

Regards,
Graham
-- 
Graham Stoney
Principal Hardware/Software Engineer
Canon Information Systems Research Australia
Ph: +61 2 9805 2909  Fax: +61 2 9805 2929

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