[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emergency Unmount...



On Wed, Apr 04, 2001 at 06:14:31PM +0200, Erik Mouw wrote:
> > > I think you can do it very simple by using the exported function
> > > handle_sysrq():
> > Maybe I'm wrong, but I'm newbie in kernel hacking.
> > I've included linux/sysrq.h. I've compiled the module correctly but, during
> > insmod, sysrq_enabled and handle_sysrq are signaled as unresolved symbol...
> > 
> > zion:~/tesi# insmod angel.o password=paolo
> > angel.o: unresolved symbol sysrq_enabled
> > angel.o: unresolved symbol handle_sysrq
> > zion:~/tesi#
> > 
> > They appear in System.map:
> > c01744f0 T handle_sysrq
> > c022c878 D sysrq_enabled
> > 
> > But don't in /proc/ksyms:
> > zion:~/tesi# grep sysrq /proc/ksyms
> > c028c624 sysrq_power_off_R0c257849
> > zion:~/tesi#
> 
> Sorry, SIGDINNER, no time left to find out :)
Tell me if I'm really wrong. After compiling my C files in object ones I link
all using -defsym handle_sysrq=0x(address taken from System.map). I called
handle_sysrq in my C file and declared the function to be extern.

Compile and link goes well but when I insmod it I receive an oops to undefined
NULL pointer exception. I call handle_sysrq('s',NULL,NULL,NULL) as you suggest
me. 

May passing handle_sysrq address to ld, cause some troubles?

Thanx
-- 
$>cd /pub
$>more beer

(0>
//\  Perego Paolo <sponge@tiscalinet.it> Tutor at D.S.I. University of Milan
V_/_ 'The future will not remember, the past doesn't forget.'
I'm Linux zion 2.2.18 #2 Fri Mar 30 11:13:18 CEST 2001 i586

PGP signature