From: "Leonidas ." <leonidas137@gmail.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Link time manipulation of kernel symbols like read/write
Date: Sun, 9 May 2010 12:21:35 +0530 [thread overview]
Message-ID: <j2if22d86811005082351x975e868foe1b40bf7a89e1448@mail.gmail.com> (raw)
In-Reply-To: <y2gf22d86811005071051q28a4fa84g2a3ea1a7ff487934@mail.gmail.com>
Couple more questions:
1. How does the dynamic linking/loading happen in kernel? What is the
equivalent of ld-linux.so in kernel space?
Any pointer will be helpful
-Leo
On Fri, May 7, 2010 at 11:21 PM, Leonidas . <leonidas137@gmail.com> wrote:
> Hi folks,
>
> Is it possible to wrap module entry points like open/close during the
> module compilation?
> By wrapping, I mean interposing using linker --wrap option. This is
> very much possible in
> user space and is commonly used to interpose library functions.
>
> E.g.
>
> void *
> __wrap_malloc (int c)
> {
> printf ("malloc called with %ld\n", c);
> return __real_malloc (c);
> }
>
> int main()
> {
> malloc(17);
> return 0;
> }
>
> Above works expected, can we wrap kmalloc this way?
>
> -Leo.
>
--
-Leo.
next prev parent reply other threads:[~2010-05-09 6:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-07 17:51 Leonidas .
2010-05-09 6:51 ` Leonidas . [this message]
2010-05-09 14:38 ` Arjan van de Ven
2010-05-09 15:19 ` Leonidas .
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=j2if22d86811005082351x975e868foe1b40bf7a89e1448@mail.gmail.com \
--to=leonidas137@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®