public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paulo Marques <pmarques@grupopie.com>
To: raja <vnagaraju@effigent.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: function Named
Date: Thu, 07 Jul 2005 14:52:33 +0100	[thread overview]
Message-ID: <42CD33A1.7030102@grupopie.com> (raw)
In-Reply-To: <42CD25FA.6030100@effigent.net>

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

      parent reply	other threads:[~2005-07-07 13:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-07 12:54 function Named raja
2005-07-07 13:43 ` Richard B. Johnson
2005-07-07 13:56   ` Jens Axboe
2005-07-07 13:59     ` Richard B. Johnson
2005-07-07 13:52 ` Paulo Marques [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42CD33A1.7030102@grupopie.com \
    --to=pmarques@grupopie.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vnagaraju@effigent.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox