How to get ELF auxiliary vector address outside of main(), not using **argv nor **envp?
Mike Frysinger
vapier@gentoo.org
Mon Apr 27 19:37:00 GMT 2009
On Monday 27 April 2009 15:14:56 Igor Zhbanov wrote:
> 2009/4/27 Carlos O'Donell <carlos@systemhalted.org>:
> http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Function-Attributes.html#Functi
>on-Attributes
>
> Alas, my library should work with gcc-3 too.
what you're trying to do is inherently unportable. that means you have to
include different methods to try and maximize coverage. there is no single
method that'll cover every requirement you want to support: different glibc
versions, different gcc versions, different linux versions, and being able to
hit the auxv vectors dynamically at any time. either get a handle at
initialization time or require people to call some library init function with
unmodified argv. then hope the argv is sane (no spurious NULLs) and environ
on stack is sane (no spurious NULLs).
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-help/attachments/20090427/f5caef1b/attachment.sig>
More information about the Libc-help
mailing list