Linux-kernel mailing list archive 2000-15,: Re: What's the deal with building intermediate .o vs .a files?

# Re: What's the deal with building intermediate .o vs .a files?

Graham Stoney (greyham@research.canon.com.au)
Mon, 10 Apr 2000 12:58:31 +1000 (EST)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Scott M. Ransom: "Strange IDE/RAID0 performance...."
- Previous message: Andrew McNabb: "RE: Suggested dual human/binary interface for proc/devfs"

> Graham Stoney wrote:
> > Is there some other hack I could
> > use to get "ar" to work with initcall, like treating it as a C++ constructor
> > or using KEEP in the .lds file or something?

Jeff Garzik writes:
> If there is an easy way to hack the ld script such that ar pulls in
> initcall [other similar special sections], that would cut down on some
> errors, I would think.

I'm currently experimenting with 2.2.x, which doesn't have initcall. I haven't
seen any problem with other lost sections yet.

Looking at initcall the 2.3.x kernel, I can't see what would make it disappear.
Can anyone enlighten me on this please?

> The general thinking seems to be "your code shouldn't contain dead code
> anyway", so getting ar to work with initcall has a fairly low priority
> IMHO

Sure, but it's real hard to do for any arbitrary combination of CONFIG_*
options, where you end up with a maze of #ifdefs. It's also error prone, and
not everyone cares enough to bother. I'm trying to go one better than ar, and
get the linker to do it for us. It's non-trivial, but I'm getting there
(slowly)...

Regards,
Graham

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

- Next message: Scott M. Ransom: "Strange IDE/RAID0 performance...."
- Previous message: Andrew McNabb: "RE: Suggested dual human/binary interface for proc/devfs"