lkml.org 
[lkml]   [1998]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: LKPK (Live Kernel Patching Kit)
Date
From
Adam Sulmicki wrote:
> Christer Weinigel writes:
>
> ->You can't change the addresses of variables or functions if the only
> ->information you have available is the System.map file. The addresses
> ->of variables and functions in the kernel are resolved at link time and
> ->are encoded in the instructions themselves.
>
> "address of var encoded into instruction themselves".
>
> I realized that a while after I wrote my post :(

It is not that bad. "insmod" must be doing the same thing. You can
load a module into the running kernel, and the external variables will
be resolved in the same way.

When I wrote the first "modules" implementation, I had a script modify
"System.map" into an assembly program that simply had all the variable
declarations, together with "org" statements to put them at the right
spot. If you compile that, you have an "object" to link against which
doesn't hold any code, but will cause all variables to be resolved
to the right address.

I -=THINK=- that insmod does the resolving/linking by itself. I didn't
want to write a new linker....
Roger.


--
Actor asks a collegue: "To what do you owe your success in acting?"
Answer: "Honesty. Once you've learned how to fake that, you've got it made."
-------- Custom Linux device drivers for sale! Call for a quote. ----------
Email: R.E.Wolff@BitWizard.nl || Tel: +31-15-2137555 || FAX: +31-15-2138217
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

\
 
 \ /
  Last update: 2005-03-22 13:43    [from the cache]
©2003-2011 Jasper Spaans