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?


2009/4/27 Carlos O'Donell <carlos@systemhalted.org>:
> On Mon, Apr 27, 2009 at 5:02 AM, Igor Zhbanov <izh1979@gmail.com> wrote:
>> But what if constructor of another library (which was called before
>> my) calls setenv()?
>
> Set the priority of your constructor such that it executes first.
>
> A robust solution to your problem may be difficult to achieve.

Yes. I agree that it is difficult. :-) I even thought about tracing
the stack from the bottom. ;-)

By the way, how to set priority of constructor?

I need constructor of my library (shared or static) to be called first,
so constructors of other libraries cannot call setenv() before I save
the value of *environ.


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