[PATCH 1/3] elf: Initialize GLRO (dl_minsigstacksize) after static dlopen

H.J. Lu hjl.tools@gmail.com
Thu May 20 14:40:32 GMT 2021


On Thu, May 20, 2021 at 6:08 AM Florian Weimer via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> This is another field of _rtld_global_ro that benefits from
> initialization in __rtld_static_init.
> ---
>  elf/rtld_static_init.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/elf/rtld_static_init.c b/elf/rtld_static_init.c
> index bded6bd2d4..9c9e069b4d 100644
> --- a/elf/rtld_static_init.c
> +++ b/elf/rtld_static_init.c
> @@ -49,6 +49,8 @@ __rtld_static_init (struct link_map *map)
>    dl->_dl_hwcap = _dl_hwcap;
>    extern __typeof (dl->_dl_hwcap2) _dl_hwcap2 attribute_hidden;
>    dl->_dl_hwcap2 = _dl_hwcap2;
> +  extern __typeof (dl->_dl_hwcap2) _dl_minsigstacksize attribute_hidden;
> +  dl->_dl_minsigstacksize = _dl_minsigstacksize;
>    extern __typeof (dl->_dl_pagesize) _dl_pagesize attribute_hidden;
>    dl->_dl_pagesize = _dl_pagesize;
>    extern __typeof (dl->_dl_tls_static_align) _dl_tls_static_align
> --
> 2.31.1
>
>

LGTM.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>

Thanks.

-- 
H.J.


More information about the Libc-alpha mailing list