Linux - KernelThis forum is for all discussion relating to the Linux kernel.
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.
Hi all,
I'd want to know where Linux keep trace about library loaded in memory. I suppose that the system has a table in memory (or just in the file system?) with a summary of the loaded library. Am I wrong?
I'm assuming you are looking for something like lsof which relates open files to applications using them. I'm not exactly sure what you are looking for, perhaps some clarity on what you are trying to do would be helpful?
yeah I think lsof would probably give you a fairly good view, lsof -u <user id> will show you files opened by that user id. If you read the man page for lsof there are many other options as well.
The library system is actually even fancier than just "shared files," because when several-dozen or several-hundred processes are using the same library it's actually more than "they've all got the same library-file open at the same time." The processes actually share the memory-segment.
The library system is actually even fancier than just "shared files," because when several-dozen or several-hundred processes are using the same library it's actually more than "they've all got the same library-file open at the same time." The processes actually share the memory-segment.
Right. I'd want to know how to identify the memory area in which libraries are loaded and which process owns them. It would be better to do it from a C program because I've to embed this function in a preexistent work.
sundialsvcs, thanks for your answer. The main problem of pmap is that I need to know where are located the information about the libraries to use that in a program written by me. This program (that is a part of a larger project) has to hook system calls and to decide which of them can be executed and which has to be stopped. Any idea about where are stored these informations?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.