From ea4f25a7f9adb67c2a19c48b453ee52fd65a57ed Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 14 Jan 2004 00:24:36 +0000 Subject: Update. 2004-01-13 Ulrich Drepper * sysdeps/x86_64/dl-machine.h: Include . * elf/rtld.c (_dl_start_final): Initialze __libc_stack_end here. * sysdeps/generic/dl-sysdep.c: Define __libc_stack_end with rtld_hidden_def and move into .data.rel.ro section. * sysdeps/generic/ldsodefs.h: Declare __libc_stack_end with rtld_hidden_proto. * sysdeps/generic/libc-start.c: Only initialize __libc_stack_end here if !SHARED. * sysdeps/unix/sysv/linux/dl-execstack.c (_dl_make_stack_executable): Move common code in front. Use __builtin_expect. --- sysdeps/generic/libc-start.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sysdeps/generic/libc-start.c') diff --git a/sysdeps/generic/libc-start.c b/sysdeps/generic/libc-start.c index e297b0a424..716bbc7018 100644 --- a/sysdeps/generic/libc-start.c +++ b/sysdeps/generic/libc-start.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998,1999,2000,2001,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1998-2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -105,10 +105,11 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL), INIT_ARGV_and_ENVIRON; - /* Store the lowest stack address. */ +#ifndef SHARED + /* Store the lowest stack address. This is done in ld.so if this is + the code for the DSO. */ __libc_stack_end = stack_end; -#ifndef SHARED # ifdef HAVE_AUX_VECTOR /* First process the auxiliary vector since we need to find the program header to locate an eventually present PT_TLS entry. */ -- cgit 1.4.1