This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
How to get ELF auxiliary vector address outside of main(), not using **argv nor **envp?
- From: Igor Zhbanov <izh1979 at gmail dot com>
- To: libc-help at sourceware dot org
- Date: Thu, 23 Apr 2009 18:41:17 +0400
- Subject: How to get ELF auxiliary vector address outside of main(), not using **argv nor **envp?
Hello!
I need to read ELF auxiliary vector in my library. To do this, I use
global pointer **environ.
But after setenv() call, environment variables are relocated, so I
can't use **environ anymore.
And I don't know, how to get **argv outside of main() in my library.
Is there any exported glibc variables that points to original argv,
envp or auxv values?
Or is there any reliable way to get ELF auxiliary vector?
Thanks.