This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Save reference to kernel provided envp in the linker
On Fri, Dec 21, 2012 at 05:47:17AM -0800, H.J. Lu wrote:
> Have you verified that envron isn't passed to functions in
> .init_array section in libpthread.so?
>
Ah, it gets environ just fine, but not __environ, which getenv uses.
Not sure what's happening, but it looks like some relocation quirk.
I'll look again.
Breakpoint 1, call_init (l=0x7ffff7ff9198, argc=1, argv=0x7fffffffdbd8, env=0x7fffffffdbe8) at dl-init.c:35
35 {
(gdb) p __environ
$3 = (char **) 0x0
(gdb) p environ
$4 = (char **) 0x7fffffffdbe8
(gdb) p __environ
$5 = (char **) 0x7fffffffdbe8
Thanks,
Siddhesh