lkml.org 
[lkml]   [2005]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: function Named
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-07 15:58    [W:2.359 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site