ich diesen Code kompiliert haben:Unknown Symbol in Modul: printk_all_partitions
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/genhd.h> // declaration of printk_all_partitions()
MODULE_LICENSE("GPL");
int __init start (void) {
printk ("evaluating the module ") ;
printk_all_partitions();
printk (" module inserted .. ");
return 0 ;
}
void __exit x(void) {
printk ("module unloaded ..");
}
module_init(start);
module_exit (x);
MODULE_LICENSE("GPL");
Make-Datei ist:
EXTRA_CFLAGS += -Wall
obj-m += printk_all_partitions.o
all :
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean :
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
wenn ich laufe ich
WARNING: "printk_all_partitions" [/root/c++/modulez/multiple_source_files/printk_plm/printk_all_partitions.ko] undefined!
egrep -w ‚get machen printk | printk_all_partitions '/ proc/kallsyms:
ffffffff8162f135 T printk
ffffffff81ac7b46 T printk_all_partitions
nun der einzige Unterschied zwischen printk und printk_all_partitions ist, dass printk_all_partitions nicht in dem Module.symvers existiert und printk ist:
0x27e1a049 printk vmlinux EXPORT_SYMBOL
Als ich das Schreiben beenden ich, dass eine Funktion herausgefunden muss sei EXPORT_SYMBOL-ed auch, damit es funktioniert
aber wenn (irgendwie) Moduls.symvers wurde gelöscht, und die Kernel-Quellen waren nicht verfügbar, beide printk und printk_all_partitions sind mit einem "T" beginnen, was anders geht weiß man, wird man exportiert oder nicht?