]> git.ipfire.org Git - thirdparty/glibc.git/commit - nptl/tst-stack4mod.c
Resize DTV if the current DTV isn't big enough
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 28 Nov 2014 15:54:07 +0000 (07:54 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 28 Nov 2014 15:57:40 +0000 (07:57 -0800)
commitd8dd00805b8f3a011735d7a407097fb1c408d867
treecc2f23b98c40684fa76e86a6230066d876b5e61b
parent167da422b30b35c9eb9fc819ce5d3b3b0d65c6f4
Resize DTV if the current DTV isn't big enough

This patch changes _dl_allocate_tls_init to resize DTV if the current DTV
isn't big enough.  Tested on X86-64, x32 and ia32.

[BZ #13862]
* elf/dl-tls.c: Include <atomic.h>.
(oom): Remove #ifdef SHARED/#endif.
(_dl_static_dtv, _dl_initial_dtv): Moved before ...
(_dl_resize_dtv): This.  Extracted from _dl_update_slotinfo.
(_dl_allocate_tls_init): Resize DTV if the current DTV isn't
big enough.
(_dl_update_slotinfo): Call _dl_resize_dtv to resize DTV.
* nptl/Makefile (tests): Add tst-stack4.
(modules-names): Add tst-stack4mod.
($(objpfx)tst-stack4): New.
(tst-stack4mod.sos): Likewise.
($(objpfx)tst-stack4.out): Likewise.
($(tst-stack4mod.sos)): Likewise.
(clean): Likewise.
* nptl/tst-stack4.c: New file.
* nptl/tst-stack4mod.c: Likewise.
ChangeLog
elf/dl-tls.c
nptl/Makefile
nptl/tst-stack4.c [new file with mode: 0644]
nptl/tst-stack4mod.c [new file with mode: 0644]