This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Remove set of __libc_stack_end from mips/dl-machine.h
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: libc-alpha at sources dot redhat dot com
- Date: Tue, 24 Aug 2004 19:04:43 +0100
- Subject: Remove set of __libc_stack_end from mips/dl-machine.h
sysdep/mips/dl-machine.h tries to overwrite __libc_stack_end after the
GNU_RELRO region has been write-protected, thus triggering a bus error.
The store seems to be completely redundant since _dl_start() already
sets the variable to the same value.
FWIW, just before submitting this, I noticed that cgd had suggested
the same patch last year:
http://sources.redhat.com/ml/libc-alpha/2003-09/msg00252.html
but that was before the GNU_RELRO stuff was added, and it didn't go in.
Tested on mips64-linux-gnu (all three ABIs). Please install if OK.
Richard
* sysdeps/mips/dl-machine.h (_dl_start_user): Don't set
__libc_stack_end.
Index: sysdeps/mips/dl-machine.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/mips/dl-machine.h,v
retrieving revision 1.74
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.74 dl-machine.h
*** sysdeps/mips/dl-machine.h 20 Jul 2004 16:35:32 -0000 1.74
--- sysdeps/mips/dl-machine.h 24 Aug 2004 18:02:04 -0000
*************** _dl_start_user:\n\
*** 485,492 ****
move $16, $28\n\
# Save the user entry point address in a saved register.\n\
move $17, $2\n\
- # Store the highest stack address\n\
- " STRINGXP(PTR_S) " $29, __libc_stack_end\n\
# See if we were run as a command with the executable file\n\
# name as an extra leading argument.\n\
lw $2, _dl_skip_args\n\
--- 485,490 ----