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, 12:02 PM   #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, 05:07 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 16,100

Rep: Reputation: 2253Reputation: 2253Reputation: 2253Reputation: 2253Reputation: 2253Reputation: 2253Reputation: 2253Reputation: 2253Reputation: 2253Reputation: 2253Reputation: 2253
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 03:44 PM
[SOLVED] Converting static IP-address to dynamic IP-address Blue_Ice Linux - Networking 3 07-20-2006 04:35 AM
Dynamic Libs (path problem) BBB Programming 1 03-18-2005 05:58 PM
Fix ip address vs Dynamic ip address yenonn Linux - Networking 5 04-13-2004 08:25 AM
Creating Dynamic libs veeru Linux - Software 0 11-23-2002 12:07 AM

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

All times are GMT -5. The time now is 08:24 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration