This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: How to access an applications ELF program header and ELF section header at runtime


Thanks for the reply, but libelf doesn?t work for me as I will have to open
the file from my library and these give me the offset of the .data and .bss
section from the load address. I was wondering if it is possible to directly
access this information from a loaded application. I believe this
information should be still available in applications address space. Is
there any way looking into the applications address space to figure this out
as this would be really efficient and would give me the actual address that
these sections are mapped to rather than offset from the applications load
address.

Regards,

Bharath

-----Original Message-----
From: patofiero@gmail.com [mailto:patofiero@gmail.com] On Behalf Of Carlos
O'Donell
Sent: Tuesday, August 18, 2009 6:47 PM
To: Bharath Ramesh
Cc: libc-help@sourceware.org
Subject: Re: How to access an applications ELF program header and ELF
section header at runtime

On Tue, Aug 18, 2009 at 12:30 PM, Bharath Ramesh<bramesh@vt.edu> wrote:
> Hi,
> ? ? ? ?I am working on a research project which requires that I find the
> address and size of the .data and .bss section of a running application.
The
> application calls a function in my library which requires this
information.
> From what I have understood about ELF I can get this information from the
> ELF headers. I am wondering if there is any way I can get the information
of
> an applications ELF program header and ELF section header at runtime. Any
> help on this is really appreciated. I am not subscribed to the list, it
> would be great if you can copy me on the reply.

Use libelf (http://directory.fsf.org/project/libelf/).

Cheers,
Carlos.

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]