Re: Getting kernel symbols in kernel module (dynamically)

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

 



Too dangrous!!

In kernel space or userspace? If in userspace, you can only call clock_gettime.

在 Wed, 25 Feb 2009 18:08:55 +0800,Ole Loots <ole@xxxxxxxxxxxxx> 写道:

Hello,

I want to call the kernel function sys_clock_gettime, but when I just try to call it, the linker complains about the unknown symbol/function sys_clock_gettime, so i have hard coded a function pointer in my module...:

long (*p_sys_clock_gettime)(clockid_t, struct timespec *tp) = 0xc004373c;

That works fine for my system, but I know thats not the way to do it. How is it done properly?

Regards,
Ole


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




--
Guo Hongruan, Embedded Linux Consultant
Mobile: +86-0-13484056007
Skype: camelguo
http://www.gulessoft.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux