Re: __init dependencies

From: Keith Owens
Date: Tue Oct 12 2004 - 01:11:13 EST


On Mon, 11 Oct 2004 21:04:46 -0700,
"Randy.Dunlap" <rddunlap@xxxxxxxx> wrote:
>Randy.Dunlap wrote:
>> Andrew Morton wrote:
>>
>>> Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
>>>
>>>> I guess it's about time for a tool to autodetect __init dependencies?
>>>
>>> `make buildcheck' does this. Looks like nobody is using it.
>
>John Cherry has been running 'make buildcheck' regularly,
>but apparently nobody has been looking.
>
>Latest (2.6.9-rc4) is here:
>http://developer.osdl.org/cherry/compile/2.6/linux-2.6.9-rc4.results/2.6.9-rc4.reference_init26.bzImage.txt
>
>My experience with output of buildcheck is that it's verbose and has
>lots of false positives. (Yes, I have used it and generated patches
>from it.) First thing I do is delete all lines that match
>"data.*init" or "data.*exit". These are (usually -- famous word) OK.

They may only be OK because the code is never run more than once.
Normal code that refers to data.*init and is run more than once is a
bug just waiting to bite you.

Andrew - small fix for reference_init.pl, against 2.6.9-rc4.

------------------------------------------------------------

Treat .pci_fixup entries the same as .init code/data.

Signed off by: Keith Owens <kaos@xxxxxxxxxx>

Index: linux/scripts/reference_init.pl
===================================================================
--- linux.orig/scripts/reference_init.pl Sat Aug 14 15:37:37 2004
+++ linux/scripts/reference_init.pl Tue Oct 12 15:59:39 2004
@@ -93,6 +93,8 @@ foreach $object (sort(keys(%object))) {
$from !~ /\.stab$/ &&
$from !~ /\.rodata$/ &&
$from !~ /\.text\.lock$/ &&
+ $from !~ /\.pci_fixup_header$/ &&
+ $from !~ /\.pci_fixup_final$/ &&
$from !~ /\.debug_/)) {
printf("Error: %s %s refers to %s\n", $object, $from, $line);
}

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