Re: function Named
From: Paulo Marques
Date: Thu Jul 07 2005 - 08:56:18 EST
raja wrote:
hi,
Is there any way to get the function address by only knowing the
function Name
See "kallsyms_lookup_name" in include/linux/kallsyms.h (implemented in
kernel/kallsyms.c).
Beware:
- CONFIG_KALLSYMS might be undefined. In that case it always returns 0
- the function returns the address of *any* known symbol, not just
functions (this can be easily improved to also return the symbol type)
- the function is extremely inefficient, as it does a linear search
over all the symbols. kallsyms is optimized to work the other way
around: get the name from the address.
--
Paulo Marques - www.grupopie.com
It is a mistake to think you can solve any major problems
just with potatoes.
Douglas Adams
-
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/