===================================================================
@@ -138,6 +138,11 @@ void (*_dl_init_static_tls) (struct link
size_t _dl_pagesize = EXEC_PAGESIZE;
+#ifdef NEED_DL_FLAGS
+/* The AT_FLAGS value passed by the kernel. */
+uintptr_t _dl_flags;
+#endif
+
int _dl_inhibit_cache;
unsigned int _dl_osversion;
@@ -236,6 +241,11 @@ _dl_aux_init (ElfW(auxv_t) *av)
if (av->a_un.a_val != 0)
GLRO(dl_pagesize) = av->a_un.a_val;
break;
+#ifdef NEED_DL_FLAGS
+ case AT_FLAGS:
+ GLRO (dl_flags) = av->a_un.a_val;
+ break;
+#endif
case AT_CLKTCK:
GLRO(dl_clktck) = av->a_un.a_val;
break;
===================================================================
@@ -126,6 +126,11 @@ _dl_sysdep_start (void **start_argptr,
case AT_PAGESZ:
GLRO(dl_pagesize) = av->a_un.a_val;
break;
+#ifdef NEED_DL_FLAGS
+ case AT_FLAGS:
+ GLRO (dl_flags) = av->a_un.a_val;
+ break;
+#endif
case AT_ENTRY:
user_entry = av->a_un.a_val;
break;
===================================================================
@@ -165,6 +165,9 @@ struct rtld_global_ro _rtld_global_ro at
._dl_lazy = 1,
._dl_fpu_control = _FPU_DEFAULT,
._dl_pagesize = EXEC_PAGESIZE,
+#ifdef NEED_DL_FLAGS
+ ._dl_flags = 0,
+#endif
._dl_inhibit_cache = 0,
/* Function pointers. */
===================================================================
@@ -472,6 +472,11 @@ struct rtld_global_ro
/* Cached value of `getpagesize ()'. */
EXTERN size_t _dl_pagesize;
+#ifdef NEED_DL_FLAGS
+ /* The AT_FLAGS value passed by the kernel. */
+ EXTERN uintptr_t _dl_flags;
+#endif
+
/* Do we read from ld.so.cache? */
EXTERN int _dl_inhibit_cache;
===================================================================
@@ -26,17 +26,20 @@ _dl_var_init (void *array[])
/* It has to match "variables" below. */
enum
{
- DL_PAGESIZE = 0
+ DL_PAGESIZE = 0,
+ DL_FLAGS
};
- GLRO(dl_pagesize) = *((size_t *) array[DL_PAGESIZE]);
+ GLRO (dl_pagesize) = *((size_t *) array[DL_PAGESIZE]);
+ GLRO (dl_flags) = *((uintptr_t *) array[DL_FLAGS]);
}
#else
static void *variables[] =
{
- &GLRO(dl_pagesize)
+ &GLRO (dl_pagesize),
+ &GLRO (dl_flags)
};
static void
===================================================================
@@ -0,0 +1,23 @@
+/* System-specific settings for dynamic linker code. MIPS/Linux version.
+ Copyright (C) 2015 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include_next <dl-sysdep.h>
+
+/* Record the AT_FLAGS value passed by the kernel in the auxiliary vector
+ to the application. */
+#define NEED_DL_FLAGS 1