save auxv pointer into libc struct early in dynamic linker startup
authorRich Felker <dalias@aerifal.cx>
Wed, 19 Nov 2014 05:34:29 +0000 (00:34 -0500)
committerRich Felker <dalias@aerifal.cx>
Wed, 19 Nov 2014 05:34:29 +0000 (00:34 -0500)
this allows most code to assume it has already been saved, and is a
prerequisite for upcoming changes for arm atomic/tls operations.

src/ldso/dynlink.c

index c90fe99..1de430c 100644 (file)
@@ -1126,6 +1126,7 @@ void *__dynlink(int argc, char **argv)
                libc.secure = 1;
        }
        libc.page_size = aux[AT_PAGESZ];
+       libc.auxv = auxv;
 
        /* If the dynamic linker was invoked as a program itself, AT_BASE
         * will not be set. In that case, we assume the base address is