am 13bd3716: am bb897fa9: Merge "libc_init_static: apply relro earlier."
* commit '13bd37160ee340ddcf7e1fb57251b124e0ec69c1':
libc_init_static: apply relro earlier.
diff --git a/libc/bionic/libc_init_static.c b/libc/bionic/libc_init_static.c
index bb3a410..24a4397 100644
--- a/libc/bionic/libc_init_static.c
+++ b/libc/bionic/libc_init_static.c
@@ -101,6 +101,8 @@
/* Initialize the C runtime environment */
__libc_init_common(elfdata);
+ apply_gnu_relro();
+
/* Several Linux ABIs don't pass the onexit pointer, and the ones that
* do never use it. Therefore, we ignore it.
*/
@@ -122,6 +124,5 @@
if (structors->fini_array)
__cxa_atexit(__libc_fini,structors->fini_array,NULL);
- apply_gnu_relro();
exit(slingshot(argc, argv, envp));
}