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.
Mention fix for PR 13862
Make linknamespace tests check only relevant libraries.

This patch addresses one known caveat in the linknamespace tests: with
this patch they will now only look for definitions of symbols in
relevant libraries, meaning that librt and libpthread are not checked
for ISO C standards, XPG3 and XPG4.

In particular, this means that if __pthread_initialize_minimal is
somehow brought in for one of those standards, the definition from
libc-tls.o will be considered instead of that from libpthread, so
avoiding bringing in lots of other libpthread symbols.  This should
address some of the failures reported by Carlos in
<https://sourceware.org/ml/libc-alpha/2014-11/msg00882.html>, where
__pointer_chk_guard_local brought in __pthread_initialize_minimal.

Tested for x86_64.  The removal of one XFAIL for XPG4 actually shows
up a header bug (shm_open should not be declared for XPG4 - the
namespace issue was for symbols brought in by shm_open, which is no
longer found at all now librt isn't searched; I've filed bug 17663 for
the header bug, though it would show up eventually anyway in the
course of review of conform/ data against XPG4).

Committed.

	* conform/Makefile (linknamespace-symlist-stdlibs-base): New
	variable.
	(linknamespace-symlist-stdlibs-tests): Likewise.
	(tests-special): Append $(linknamespace-symlist-stdlibs-tests)
	instead of $(objpfx)symlist-stdlibs.
	(linknamespace-libs-isoc): New variable.
	(linknamespace-libs): Use $(linknamespace-libs-isoc).
	(linknamespace-libs-ISO): New variable.
	(linknamespace-libs-ISO99): Likewise.
	(linknamespace-libs-ISO11): Likewise.
	(linknamespace-libs-XPG3): Likewise.
	(linknamespace-libs-XPG4): Likewise.
	(linknamespace-libs-POSIX): Likewise.
	(linknamespace-libs-UNIX98): Likewise.
	(linknamespace-libs-XOPEN2K): Likewise.
	(linknamespace-libs-POSIX2008): Likewise.
	(linknamespace-libs-XOPEN2K8): Likewise.
	($(objpfx)symlist-stdlibs): Replace by
	$(linknamespace-symlist-stdlibs-tests).  Use
	$(linknamespace-libs-$*) as set of libraries.
	($(linknamespace-header-tests)): Update dependencies.  Use
	$(objpfx)symlist-stdlibs-$$std for --libsyms argument.
	(test-xfail-XPG4/sys/mman.h/linknamespace): Remove.
	* conform/linknamespace.pl: Remove comment about considering
	definitions of symbols from irrelevant libraries.