LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 05-03-2008, 04:39 AM   #1
tonyr81
LQ Newbie
 
Registered: Dec 2005
Posts: 13

Rep: Reputation: 0
Question about library


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?

Thanks for your help

Antonio
 
Old 05-03-2008, 11:21 PM   #2
xonogenic
Member
 
Registered: Feb 2006
Posts: 30

Rep: Reputation: 2
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?
 
Old 05-04-2008, 03:17 AM   #3
tonyr81
LQ Newbie
 
Registered: Dec 2005
Posts: 13

Original Poster
Rep: Reputation: 0
My aim is to know which instructions are running in the system and who is the process owner.

Bye bye
Antonio
 
Old 05-04-2008, 08:44 AM   #4
xonogenic
Member
 
Registered: Feb 2006
Posts: 30

Rep: Reputation: 2
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.
 
Old 05-04-2008, 09:44 PM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
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.
 
Old 05-06-2008, 12:57 PM   #6
tonyr81
LQ Newbie
 
Registered: Dec 2005
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by sundialsvcs View Post
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.

Last edited by tonyr81; 05-06-2008 at 01:01 PM.
 
Old 05-06-2008, 10:50 PM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
pmap is a place to start ... It's not exactly what you are looking for, however.
 
Old 05-13-2008, 02:35 PM   #8
tonyr81
LQ Newbie
 
Registered: Dec 2005
Posts: 13

Original Poster
Rep: Reputation: 0
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?

Thanks
Antonio
 
Old 05-19-2008, 02:46 PM   #9
tonyr81
LQ Newbie
 
Registered: Dec 2005
Posts: 13

Original Poster
Rep: Reputation: 0
I change my question...

How can I identify what kind of instruction is pointed by the address stored in EIP?

Thanks for help

Antonio
 
  


Reply

Tags
library



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
General question and Library question gauol Linux - General 1 10-20-2007 07:10 PM
Question about Glib Library ninja Linux - Software 3 11-24-2004 11:06 AM
Question about Readline Library sasha_baranov Programming 0 08-23-2004 03:39 PM
library linking question. shaggz Linux - General 1 04-25-2004 11:22 PM
shared library question budzynm Linux - Software 1 09-21-2003 10:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 11:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration