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 get ELF auxiliary vector address outside of main(), not using **argv nor **envp?


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

Attachment: signature.asc
Description: This is a digitally signed message part.


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