Date: Mon, 4 Jan 1999 15:46:43 -0800 From: "Steve Goldstone" <sgoldsto@us.checkpoint.com> To: <freebsd-questions@FreeBSD.ORG> Subject: Patching variable in kernel loadable modules Message-ID: <008f01be383c$7c45e060$f22356ce@dunwich.us.checkpoint.com>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. ------=_NextPart_000_008C_01BE37F9.6D83EF60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I have a freebsd kernel loadable module and I need to modify a specific = global initialization variable for a few customer sites. Is there a = utility that does this? It needs to: 1. Load the binary image; 2. Look up the variable in the symbol table; 3. Retrieve the variable's offset in the binary file; 4. Apply a numeric value to the offset; 5. Write out the binary image to a disk file. If such a utility isn't available, is there documentation on the format = of the kernel module so I can write my own utility? Thanks, Steve ------=_NextPart_000_008C_01BE37F9.6D83EF60 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN"> <HTML> <HEAD> <META content=3Dtext/html;charset=3Diso-8859-1 = http-equiv=3DContent-Type> <META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT color=3D#000000>Hi,</FONT></DIV> <DIV><FONT color=3D#000000></FONT> </DIV> <DIV><FONT color=3D#000000>I have a freebsd kernel loadable module and I = need to=20 modify a specific global initialization variable for a few customer = sites. =20 Is there a utility that does this? It needs to:</FONT></DIV> <DIV><FONT color=3D#000000></FONT> </DIV> <DIV><FONT color=3D#000000>1. Load the binary image;</FONT></DIV> <DIV><FONT color=3D#000000>2. Look up the variable in the symbol=20 table;</FONT></DIV> <DIV><FONT color=3D#000000></FONT>3. Retrieve the variable's = offset in the=20 binary file;</DIV> <DIV><FONT color=3D#000000>4. Apply a numeric value to the=20 offset;</FONT></DIV> <DIV>5. Write out the binary image to a disk file.</DIV> <DIV> </DIV> <DIV>If such a utility isn't available, is there documentation on the = format of=20 the kernel module so I can write my own utility?</DIV> <DIV> </DIV> <DIV>Thanks,</DIV> <DIV> </DIV> <DIV>Steve</DIV></BODY></HTML> ------=_NextPart_000_008C_01BE37F9.6D83EF60-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?008f01be383c$7c45e060$f22356ce>
