This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
Re: where is data for shared objects?
- To: glibc-linux at ricardo dot ecn dot wfu dot edu
- Subject: Re: where is data for shared objects?
- From: Muzaffer Ozakca <muzaffer dot ozakca at bilten dot metu dot edu dot tr>
- Date: Mon, 13 Aug 2001 10:07:09 +0300
- Organization: Tubitak - Bilten
- References: <3B70EE02.8B5077EB@bilten.metu.edu.tr>
- Reply-To: glibc-linux at ricardo dot ecn dot wfu dot edu
Hello again,
I guess the question was not clear. Let me state it in another way:
|____________
| data of
| libYY
|____________
| text of
| libYY
|____________
.
.
.
|____________
| data of
| libXX
|____________
| text of
| libXX
|____________
.
.
.
|
|
|___________
| data
|___________
| text <- etext points here
|___________
The above is a typical (virtual) memory layout of a fictitious process.
I can find the end of the text for the process itself via global
'etext'. Data for the process starts at a page boundary after 'etext'. I
can find the end of the data using setbrk() call (I could also be using
'_end'). But, I want to find the addresses for the start and end of data
for, say, libXX (which is a shared lib). I actually can read it through
/proc file system. What I wonder is if there is another way to do it.
many thanks.
Muzaffer Ozakca wrote:
>
> Hello,
>
> I'm trying to find a way to access the data and bss sections of a shared
> library during the execution of a process. I can see through /proc on my
> Solaris box that there is a gap between a processes heap and the first
> library's text. Is there a way to access the data sections other than
> using /proc?
>
> I see that each library has seperate data and bss. Thanks for any help.
> --
> Muzaffer Ozakca
> Researcher/Software Engineer - muzaffer.ozakca@bilten.metu.edu.tr
> TUBITAK-Bilten-ODTU - Communications Systems and Comp. Networks Group
> ODTU, Ankara, Turkey
> http://www.bilten.metu.edu.tr tel: +90-312-210 1311
--
Muzaffer Ozakca
Researcher/Software Engineer - muzaffer.ozakca@bilten.metu.edu.tr
TUBITAK-Bilten-ODTU - Communications Systems and Comp. Networks Group
ODTU, Ankara, Turkey
http://www.bilten.metu.edu.tr tel: +90-312-210 1311