This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: How to access an applications ELF program header and ELF section header at runtime
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Bharath Ramesh <bramesh at vt dot edu>
- Cc: libc-help at sourceware dot org
- Date: Tue, 18 Aug 2009 18:46:56 -0400
- Subject: Re: How to access an applications ELF program header and ELF section header at runtime
- References: <017801ca2021$2bbf3000$833d9000$@edu>
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.