Detecting section mismatches in vmlinux

From: Atsushi Nemoto
Date: Wed Feb 21 2007 - 10:57:53 EST


Until 2.6.16 or so, we had reference_init.pl and
reference_discarded.pl to check section mismatches in vmlinux.

Are there any alternatives of this in recent kernel?

Now "modpost vmlinux" is executed during normal build, but it seems
the pass can not detect these mismatches.

For example:

$ ../build-i386/scripts/mod/modpost ../build-i386/mm/built-in.o
WARNING: ../build-i386/mm/built-in.o - Section mismatch: reference to .init.data:initkmem_list3 from .text between 'set_up_list3s' (at offset 0x18382) and '__kmem_cache_destroy'

set_up_list3s() in slab.c is not marked as __init and it references
initkmem_list3[] which is marked as __initdata. So it is not false
positive. But "modpost vmlinux" does not report it.

---
Atsushi Nemoto
-
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/