diff options
Diffstat (limited to 'elf')
-rw-r--r-- | elf/dl-support.c | 5 | ||||
-rw-r--r-- | elf/dl-sysdep.c | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/elf/dl-support.c b/elf/dl-support.c index 7abb65d8e3..7fc2ee78e2 100644 --- a/elf/dl-support.c +++ b/elf/dl-support.c @@ -142,6 +142,8 @@ void (*_dl_init_static_tls) (struct link_map *) = &_dl_nothread_init_static_tls; size_t _dl_pagesize = EXEC_PAGESIZE; +size_t _dl_minsigstacksize = CONSTANT_MINSIGSTKSZ; + int _dl_inhibit_cache; unsigned int _dl_osversion; @@ -307,6 +309,9 @@ _dl_aux_init (ElfW(auxv_t) *av) case AT_RANDOM: _dl_random = (void *) av->a_un.a_val; break; + case AT_MINSIGSTKSZ: + _dl_minsigstacksize = av->a_un.a_val; + break; DL_PLATFORM_AUXV } if (seen == 0xf) diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c index 0658c17da6..bd5066fe3b 100644 --- a/elf/dl-sysdep.c +++ b/elf/dl-sysdep.c @@ -115,6 +115,11 @@ _dl_sysdep_start (void **start_argptr, user_entry = (ElfW(Addr)) ENTRY_POINT; GLRO(dl_platform) = NULL; /* Default to nothing known about the platform. */ + /* NB: Default to a constant CONSTANT_MINSIGSTKSZ. */ + _Static_assert (__builtin_constant_p (CONSTANT_MINSIGSTKSZ), + "CONSTANT_MINSIGSTKSZ is constant"); + GLRO(dl_minsigstacksize) = CONSTANT_MINSIGSTKSZ; + for (av = GLRO(dl_auxv); av->a_type != AT_NULL; set_seen (av++)) switch (av->a_type) { @@ -179,6 +184,9 @@ _dl_sysdep_start (void **start_argptr, case AT_RANDOM: _dl_random = (void *) av->a_un.a_val; break; + case AT_MINSIGSTKSZ: + GLRO(dl_minsigstacksize) = av->a_un.a_val; + break; DL_PLATFORM_AUXV } @@ -306,6 +314,7 @@ _dl_show_auxv (void) [AT_SYSINFO_EHDR - 2] = { "SYSINFO_EHDR: 0x", hex }, [AT_RANDOM - 2] = { "RANDOM: 0x", hex }, [AT_HWCAP2 - 2] = { "HWCAP2: 0x", hex }, + [AT_MINSIGSTKSZ - 2] = { "MINSIGSTKSZ ", dec }, [AT_L1I_CACHESIZE - 2] = { "L1I_CACHESIZE: ", dec }, [AT_L1I_CACHEGEOMETRY - 2] = { "L1I_CACHEGEOMETRY: 0x", hex }, [AT_L1D_CACHESIZE - 2] = { "L1D_CACHESIZE: ", dec }, |