modpost: don't allow *driver to reference .init.*
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sat, 30 Jan 2010 20:14:23 +0000 (21:14 +0100)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sat, 30 Jan 2010 20:14:23 +0000 (21:14 +0100)
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
scripts/mod/modpost.c

index 5dbe4db2bd4204854f90bb3017c8c4040321cc4c..3318692e4e761ffecaf1849693e376291b5a7655 100644 (file)
@@ -862,10 +862,19 @@ const struct sectioncheck sectioncheck[] = {
 },
 {
        .fromsec = { DATA_SECTIONS, NULL },
-       .tosec   = { ALL_INIT_SECTIONS, NULL },
+       .tosec   = { ALL_XXXINIT_SECTIONS, NULL },
        .mismatch = DATA_TO_ANY_INIT,
        .symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },
 },
+{
+       .fromsec = { DATA_SECTIONS, NULL },
+       .tosec   = { INIT_SECTIONS, NULL },
+       .mismatch = DATA_TO_ANY_INIT,
+       .symbol_white_list = {
+               "*_template", "*_timer", "*_sht", "*_ops",
+               "*_probe", "*_probe_one", "*_console", NULL
+       },
+},
 {
        .fromsec = { TEXT_SECTIONS, NULL },
        .tosec   = { ALL_EXIT_SECTIONS, NULL },