From: Richard Henderson Date: Fri, 16 Jan 2004 08:07:01 +0000 (+0000) Subject: * elf/dl-load.c: Don't declare __libc_stack_end. * sysdeps/generic... X-Git-Tag: upstream/2.20~11378 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff151400d89760e9f4b761c14b311e42bc9058bf;p=platform%2Fupstream%2Flinaro-glibc.git * elf/dl-load.c: Don't declare __libc_stack_end. * sysdeps/generic/libc-start.c: Likewise. * sysdeps/unix/sysv/linux/dl-execstack.c: Likewise. * sysdeps/generic/segfault.c: Likewise. Include ldsodefs.h. * sysdeps/generic/backtrace.c: Likewise. linuxthreads/ * attr.c: Include ldsodefs.h. (pthread_getattr_np): Don't declare __libc_stack_end. nptl/ * allocatestack.c: Don't declare __libc_stack_end. * init.c (__pthread_initialize_minimal_internal): Likewise. * pthread_getattr_np.c (pthread_getattr_np): Likewise. 2004-01-16 Richard Henderson * elf/dl-load.c: Don't declare __libc_stack_end. * sysdeps/generic/libc-start.c: Likewise. * sysdeps/unix/sysv/linux/dl-execstack.c: Likewise. * sysdeps/generic/segfault.c: Likewise. Include ldsodefs.h. * sysdeps/generic/backtrace.c: Likewise. --- diff --git a/ChangeLog b/ChangeLog index 09a828d..3797214 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-01-16 Richard Henderson + + * elf/dl-load.c: Don't declare __libc_stack_end. + * sysdeps/generic/libc-start.c: Likewise. + * sysdeps/unix/sysv/linux/dl-execstack.c: Likewise. + * sysdeps/generic/segfault.c: Likewise. Include ldsodefs.h. + * sysdeps/generic/backtrace.c: Likewise. + 2004-01-15 Ulrich Drepper * Versions.def: Add GLIBC_2.3.4. diff --git a/elf/dl-load.c b/elf/dl-load.c index 527a5f1..f9e2bcb 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -1949,7 +1949,6 @@ cannot create shared object descriptor")); N_("cannot open shared object file")); } - extern void *__libc_stack_end; void *stack_end = __libc_stack_end; return _dl_map_object_from_fd (name, fd, &fb, realname, loader, type, mode, &stack_end); diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 9129604..70558eb 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,8 @@ +2004-01-16 Richard Henderson + + * attr.c: Include ldsodefs.h. + (pthread_getattr_np): Don't declare __libc_stack_end. + 2004-01-09 Steven Munroe * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h diff --git a/linuxthreads/attr.c b/linuxthreads/attr.c index a88fdb9..2adc7cc 100644 --- a/linuxthreads/attr.c +++ b/linuxthreads/attr.c @@ -26,6 +26,8 @@ #include "pthread.h" #include "internals.h" #include +#include + int __pthread_attr_init_2_1(pthread_attr_t *attr) { @@ -415,9 +417,6 @@ int pthread_getattr_np (pthread_t thread, pthread_attr_t *attr) if (descr == &__pthread_initial_thread) #endif { - /* Defined in ld.so. */ - extern void *__libc_stack_end; - /* Stack size limit. */ struct rlimit rl; diff --git a/nptl/ChangeLog b/nptl/ChangeLog index af51441..3409861 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,9 @@ +2004-01-16 Richard Henderson + + * allocatestack.c: Don't declare __libc_stack_end. + * init.c (__pthread_initialize_minimal_internal): Likewise. + * pthread_getattr_np.c (pthread_getattr_np): Likewise. + 2004-01-15 Richard Henderson * sysdeps/alpha/tls.h (tcbhead_t): Add private. diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index 02de7f0..7aa5af2 100644 --- a/nptl/allocatestack.c +++ b/nptl/allocatestack.c @@ -661,8 +661,6 @@ __deallocate_stack (struct pthread *pd) } -extern void *__libc_stack_end; - int internal_function __make_stacks_executable (void **stack_endp) diff --git a/nptl/init.c b/nptl/init.c index 876b9d3..fd4544c 100644 --- a/nptl/init.c +++ b/nptl/init.c @@ -217,9 +217,6 @@ __pthread_initialize_minimal_internal (void) THREAD_SETMEM (pd, cpuclock_offset, GL(dl_cpuclock_offset)); #endif - /* Defined in ld.so. */ - extern void *__libc_stack_end; - /* Set initial thread's stack block from 0 up to __libc_stack_end. It will be bigger than it actually is, but for unwind.c/pt-longjmp.c purposes this is good enough. */ diff --git a/nptl/pthread_getattr_np.c b/nptl/pthread_getattr_np.c index 0e10820..769f4f5 100644 --- a/nptl/pthread_getattr_np.c +++ b/nptl/pthread_getattr_np.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -72,9 +72,6 @@ pthread_getattr_np (thread_id, attr) thread. Get the info in some magical way. */ assert (abs (thread->pid) == thread->tid); - /* Defined in ld.so. */ - extern void *__libc_stack_end; - /* Stack size limit. */ struct rlimit rl; diff --git a/sysdeps/generic/backtrace.c b/sysdeps/generic/backtrace.c index f27f890..6a3336c 100644 --- a/sysdeps/generic/backtrace.c +++ b/sysdeps/generic/backtrace.c @@ -1,5 +1,5 @@ /* Return backtrace of current program state. Generic version. - Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 2000, 2002, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -23,11 +23,7 @@ #include #include #include - -/* This is a global variable set at program start time. It marks the - highest used stack address. */ -extern void *__libc_stack_end; - +#include /* This implementation assumes a stack layout that matches the defaults used by gcc's `__builtin_frame_address' and `__builtin_return_address' diff --git a/sysdeps/generic/libc-start.c b/sysdeps/generic/libc-start.c index 716bbc7..582ae0b 100644 --- a/sysdeps/generic/libc-start.c +++ b/sysdeps/generic/libc-start.c @@ -26,7 +26,6 @@ extern void __libc_init_first (int argc, char **argv, char **envp); extern int __libc_multiple_libcs; -extern void *__libc_stack_end; #include #ifndef SHARED diff --git a/sysdeps/generic/segfault.c b/sysdeps/generic/segfault.c index 1687314..47f2447 100644 --- a/sysdeps/generic/segfault.c +++ b/sysdeps/generic/segfault.c @@ -1,5 +1,6 @@ /* Catch segmentation faults and print backtrace. - Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -28,6 +29,7 @@ #include #include #include +#include #include @@ -41,11 +43,6 @@ /* Get code to possibly dump the content of all registers. */ #include -/* This is a global variable set at program start time. It marks the - highest used stack address. */ -extern void *__libc_stack_end; - - /* This implementation assumes a stack layout that matches the defaults used by gcc's `__builtin_frame_address' and `__builtin_return_address' (FP is the frame pointer register): diff --git a/sysdeps/unix/sysv/linux/dl-execstack.c b/sysdeps/unix/sysv/linux/dl-execstack.c index e96197a..48512ed 100644 --- a/sysdeps/unix/sysv/linux/dl-execstack.c +++ b/sysdeps/unix/sysv/linux/dl-execstack.c @@ -26,8 +26,6 @@ #include "kernel-features.h" -extern void *__libc_stack_end attribute_hidden; - int internal_function _dl_make_stack_executable (void **stack_endp)