#ifndef HAVE_KALLSYMS_LOOKUP_NAME
int kallsyms_strcmp(void *name, const char *symbol_name, struct module *, unsigned long symbol_address)
{
return strcmp(name, symbol_name) == 0 ? symbol_address : 0;
}
/* Note that kallsyms_strcmp() cannot return the full symbol address, only the low 32 bits.
* We can handle this by extracting the high word from some other kernel function */
unsigned long ll_kallsyms_lookup_name(const char *name)
{
unsigned int low_addr = kallsyms_on_each_symbol(kallsyms_strcmp, name);
return low_addr ? kallsyms_on_each_symbol & 0xffffffff00000000ULL | low_addr : 0;
}
#else
#define ll_kallsyms_lookup_name(name) kallsyms_lookup_name(name)
#endif
I agree James