LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-19-2009, 11:02 AM   #1
fettigepommes
LQ Newbie
 
Registered: Apr 2009
Posts: 1

Rep: Reputation: 0
How to get address of vmas of dynamic libs (not using /proc)


Hello world!

I would like to obtain the address of the dynamic linker during runtime. I could use the /proc/<pid>/maps together with a regex. For example:

b7f89000-b7fa3000 r-xp 00000000 08:04 4554816 /lib/ld-2.7.so

I am want address b7f89000.


But I would like to find a better solution, I looked at dlopen etc. but could not figure it out. Is it possible with dlopen/dlsym ?

I tried to get a pointer to the task_struct structure to iterate over all vmas but I did not find a way to do this either.

Thank you for any help!
 
Old 05-20-2009, 04:07 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,099

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
Why do we continue to get people who refuse to use /proc ?
It's a request to expose data from kernel structures - what better solution do you want ?.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Dynamic IP Address landysaccount Linux - Newbie 5 01-14-2009 02:44 PM
[SOLVED] Converting static IP-address to dynamic IP-address Blue_Ice Linux - Networking 3 07-20-2006 03:35 AM
Dynamic Libs (path problem) BBB Programming 1 03-18-2005 04:58 PM
Fix ip address vs Dynamic ip address yenonn Linux - Networking 5 04-13-2004 07:25 AM
Creating Dynamic libs veeru Linux - Software 0 11-22-2002 11:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:38 AM.

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