Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am developing a function say my_abc() which does the same thing as kernel function abc(). Now I want that instead of using predefined kernel function kernel starts using my function. It might be possible that the kernel function has been used so many places. Anyone having idea how to achieve this.
Thanks.
Last edited by ravishekhar.82; 03-31-2010 at 03:21 AM.
Or, perhaps you are trying to replace a libc function. What specific function(s) are you trying to replace. It may be a as simple as controlling the order of files provided to the linker.
--- rod.
Okay, so now that it is more clear that you are actually dealing with a kernel matter, never mind the business about the order of linking; that was only in the case that you were really trying to over-ride a standard library function (distinct from a kernel function).
If you are going to replace functionality that is in the kernel, you will have to write a new kernel driver/module. It may have to be built into the kernel. It will probably be easiest to take the existing module, and modify it to do what you really want it to do.
Kernel programming is a whole different world from userspace programming. There are numerous good articles and even one popular online book that describes kernel level programming. Google is your friend.
Just to say - I like the idea that Ravi has about DOING this in the first place - this sounds immensely cool.
Ravi, when you get it working, please post back in this thread to let us know what worked .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.