From: Willy Tarreau <w@1wt.eu>
To: Dragoslav Zaric <dragoslav.zaric.kd@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: Test some kernel feature without recompile
Date: Sun, 22 Mar 2009 12:42:37 +0100 [thread overview]
Message-ID: <20090322114237.GB570@1wt.eu> (raw)
In-Reply-To: <2d05c4580903220343l4b1359fx79f18b56203bd463@mail.gmail.com>
On Sun, Mar 22, 2009 at 11:43:28AM +0100, Dragoslav Zaric wrote:
> Hi,
>
> I know when you work on some kernel module, you can change code and load
> module again and test it, but what if you change some built in kernel
> .c file, why
> would I need to recompile whole kernel just to see what happens if I change one
> .c file ??
>
> Why can I just compile one changed .c file and copy it where compiled version of
> that file reside inside kernel tree? Or maybe there is some image info embedded
> inside compiled files, so that file must belong to specific image from
> which it is
> installed ?
Well, in some cases you can do that. For very minor changes (constants,
disabling 'if' statements, breaking out of loops, or returning from
functions), tampering the memory with an hex editor is often more
convenient than rebooting. /proc/ksyms is your friend here. It also
sometimes help you see the effect of your changes. But you must always
be ready to reboot anyway because mistakes are quite common and generally
don't leave you with a second chance.
Willy
next prev parent reply other threads:[~2009-03-22 11:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-22 10:43 Dragoslav Zaric
2009-03-22 11:04 ` Jaswinder Singh Rajput
2009-03-22 11:42 ` Willy Tarreau [this message]
2009-03-22 20:29 ` Jesper Juhl
2009-03-23 8:51 ` Dragoslav Zaric
2009-03-23 8:52 ` Dragoslav Zaric
2009-03-23 3:21 ` Bryan Donlan
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=20090322114237.GB570@1wt.eu \
--to=w@1wt.eu \
--cc=dragoslav.zaric.kd@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®