[Top] [All Lists]

Re: Calling testers for another Dead Function Optimisation update

To: (Dan Malek)
Subject: Re: Calling testers for another Dead Function Optimisation update
From: (Graham Stoney)
Date: Tue, 16 May 2000 12:07:16 +1000 (EST)
Cc: (Graham Stoney),,,,,,,
In-reply-to: <> 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.

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>