From dde2652bb6db2a9d524f46aafbac0112d1e7ae53 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 1 Dec 2002 22:14:57 +0000 Subject: * 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 . * 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 * 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. --- sysdeps/generic/libc-start.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sysdeps/generic/libc-start.c') diff --git a/sysdeps/generic/libc-start.c b/sysdeps/generic/libc-start.c index ef02b1819f..5b2728b8ba 100644 --- a/sysdeps/generic/libc-start.c +++ b/sysdeps/generic/libc-start.c @@ -17,6 +17,7 @@ 02111-1307 USA. */ #include +#include #include #include #include @@ -29,6 +30,7 @@ extern void *__libc_stack_end; #include #ifndef SHARED +# include extern void __pthread_initialize_minimal (void) # if !(USE_TLS - 0) __attribute__ ((weak)) @@ -81,6 +83,14 @@ BP_SYM (__libc_start_main) (int (*main) (int, char **, char **), ++auxvec; _dl_aux_init ((ElfW(auxv_t) *) auxvec); # 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 functions are using thread functions if these are available and -- cgit v1.2.3