* sysdeps/generic/libc-start.c (__libc_start_main): Do

DL_SYSDEP_OSCHECK here.
	* sysdeps/unix/sysv/linux/init-first.c (init): Not here.
	* sysdeps/unix/sysv/linux/dl-osinfo.h: Include <fcntl.h>.

	* sysdeps/generic/libc-tls.c (__libc_setup_tls): Bail if
	argument TCBSIZE <= TLS_INIT_TCB_SIZE, not just if it's zero.

	* sysdeps/generic/dl-tls.c (_dl_allocate_tls_init): Check l_tls_offset
	instead of l_type to decide whether to use TLS_DTV_UNALLOCATED.

	* include/link.h: Comment typo fix.

2002-12-01  Roland McGrath  <roland@frob.com>

	* sysdeps/mach/hurd/bits/posix_opt.h (_POSIX_FSYNC): Set to 200112L.
	(_POSIX_SPAWN, _POSIX_MAPPED_FILES, _POSIX_MEMLOCK_RANGE,
	_POSIX_MEMORY_PROTECTION): Likewise.
	(_POSIX_POLL, _POSIX_SELECT): Removed.
This commit is contained in:
Roland McGrath 2002-12-01 22:14:57 +00:00
parent 877e0d8e45
commit dde2652bb6
6 changed files with 35 additions and 9 deletions

View File

@ -1,3 +1,25 @@
2002-12-01 Roland McGrath <roland@redhat.com>
* sysdeps/generic/libc-start.c (__libc_start_main): Do
DL_SYSDEP_OSCHECK here.
* sysdeps/unix/sysv/linux/init-first.c (init): Not here.
* sysdeps/unix/sysv/linux/dl-osinfo.h: Include <fcntl.h>.
* sysdeps/generic/libc-tls.c (__libc_setup_tls): Bail if
argument TCBSIZE <= TLS_INIT_TCB_SIZE, not just if it's zero.
* sysdeps/generic/dl-tls.c (_dl_allocate_tls_init): Check l_tls_offset
instead of l_type to decide whether to use TLS_DTV_UNALLOCATED.
* include/link.h: Comment typo fix.
2002-12-01 Roland McGrath <roland@frob.com>
* sysdeps/mach/hurd/bits/posix_opt.h (_POSIX_FSYNC): Set to 200112L.
(_POSIX_SPAWN, _POSIX_MAPPED_FILES, _POSIX_MEMLOCK_RANGE,
_POSIX_MEMORY_PROTECTION): Likewise.
(_POSIX_POLL, _POSIX_SELECT): Removed.
2002-11-28 Ulrich Drepper <drepper@redhat.com> 2002-11-28 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which

View File

@ -309,7 +309,7 @@ _dl_allocate_tls_init (void *result)
/* Unused entry. */ /* Unused entry. */
continue; continue;
if (map->l_type == lt_loaded) if (map->l_tls_offset == 0)
{ {
/* For dynamically loaded modules we simply store /* For dynamically loaded modules we simply store
the value indicating deferred allocation. */ the value indicating deferred allocation. */

View File

@ -17,6 +17,7 @@
02111-1307 USA. */ 02111-1307 USA. */
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h>
#include <unistd.h> #include <unistd.h>
#include <ldsodefs.h> #include <ldsodefs.h>
#include <bp-start.h> #include <bp-start.h>
@ -29,6 +30,7 @@ extern void *__libc_stack_end;
#include <tls.h> #include <tls.h>
#ifndef SHARED #ifndef SHARED
# include <dl-osinfo.h>
extern void __pthread_initialize_minimal (void) extern void __pthread_initialize_minimal (void)
# if !(USE_TLS - 0) # if !(USE_TLS - 0)
__attribute__ ((weak)) __attribute__ ((weak))
@ -81,6 +83,14 @@ BP_SYM (__libc_start_main) (int (*main) (int, char **, char **),
++auxvec; ++auxvec;
_dl_aux_init ((ElfW(auxv_t) *) auxvec); _dl_aux_init ((ElfW(auxv_t) *) auxvec);
# endif # endif
# ifdef DL_SYSDEP_OSCHECK
if (!__libc_multiple_libcs)
{
/* This needs to run to initiliaze _dl_osversion before TLS
setup might check it. */
DL_SYSDEP_OSCHECK (__libc_fatal);
}
# endif
/* Initialize the thread library at least a bit since the libgcc /* Initialize the thread library at least a bit since the libgcc
functions are using thread functions if these are available and functions are using thread functions if these are available and

View File

@ -102,7 +102,7 @@ __libc_setup_tls (size_t tcbsize, size_t tcbalign)
break; break;
} }
if (memsz == 0 && tcbsize == 0) if (memsz == 0 && tcbsize <= TLS_INIT_TCB_SIZE)
/* We do not need a TLS block and no thread descriptor. */ /* We do not need a TLS block and no thread descriptor. */
return; return;

View File

@ -18,6 +18,7 @@
02111-1307 USA. */ 02111-1307 USA. */
#include <string.h> #include <string.h>
#include <fcntl.h>
#include <sys/sysctl.h> #include <sys/sysctl.h>
#include <sys/utsname.h> #include <sys/utsname.h>
#include "kernel-features.h" #include "kernel-features.h"

View File

@ -28,9 +28,6 @@
#include <libc-internal.h> #include <libc-internal.h>
#include <ldsodefs.h> #include <ldsodefs.h>
#ifndef SHARED
# include "dl-osinfo.h"
#endif
/* The function is called from assembly stubs the compiler can't see. */ /* The function is called from assembly stubs the compiler can't see. */
static void init (int, char **, char **) __attribute__ ((unused)); static void init (int, char **, char **) __attribute__ ((unused));
@ -57,10 +54,6 @@ init (int argc, char **argv, char **envp)
/* Make sure we don't initialize twice. */ /* Make sure we don't initialize twice. */
if (!__libc_multiple_libcs) if (!__libc_multiple_libcs)
{ {
#ifndef SHARED
DL_SYSDEP_OSCHECK (__libc_fatal);
#endif
/* Set the FPU control word to the proper default value if the /* Set the FPU control word to the proper default value if the
kernel would use a different value. (In a static program we kernel would use a different value. (In a static program we
don't have this information.) */ don't have this information.) */