aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sparc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-09-24 21:13:55 +0000
committerUlrich Drepper <drepper@redhat.com>2003-09-24 21:13:55 +0000
commit977169541668f2287c5f8e239e5743eb9cefcb63 (patch)
treebabcc4b260b9fda3a335f6eaeac204b1495ce3b8 /sysdeps/sparc
parent0f124303c8bebc3258d2d22bdc03271e85b9ea42 (diff)
downloadglibc-977169541668f2287c5f8e239e5743eb9cefcb63.tar
glibc-977169541668f2287c5f8e239e5743eb9cefcb63.tar.gz
glibc-977169541668f2287c5f8e239e5743eb9cefcb63.tar.bz2
glibc-977169541668f2287c5f8e239e5743eb9cefcb63.zip
Update.
2003-09-24 Ulrich Drepper <drepper@redhat.com> * sysdeps/ia64/dl-machine.h (RTLD_START): Remove setting of __libc_stack_end. Patch by David Mosberger. 2003-09-24 Jakub Jelinek <jakub@redhat.com> * elf/Versions (ld): Export __libc_stack_end@GLIBC_2.1 instead of __libc_stack_end@GLIBC_PRIVATE. * sysdeps/generic/dl-sysdep.c (DL_STACK_END): Define if not defined. (_dl_sysdep_start): Set __libc_stack_end here. * sysdeps/alpha/dl-machine.h (RTLD_START): Remove setting of __libc_stack_end. * sysdeps/arm/dl-machine.h (RTLD_START): Likewise. * sysdeps/cris/dl-machine.h (RTLD_START): Likewise. * sysdeps/i386/dl-machine.h (RTLD_START): Likewise. * sysdeps/m68k/dl-machine.h (RTLD_START): Likewise. * sysdeps/s390/s390-32/dl-machine.h (RTLD_START): Likewise. * sysdeps/s390/s390-64/dl-machine.h (RTLD_START): Likewise. * sysdeps/sh/dl-machine.h (RTLD_START): Likewise. * sysdeps/x86_64/dl-machine.h (RTLD_START): Likewise. * sysdeps/ia64/dl-machine.h (DL_STACK_END): Define. * sysdeps/sparc/sparc32/dl-machine.h (DL_STACK_END): Define. (RTLD_START): Remove setting of __libc_stack_end. * sysdeps/sparc/sparc64/dl-machine.h (DL_STACK_END): Define. (RTLD_START): Remove setting of __libc_stack_end. 2003-09-24 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/sys/sysmacros.h: Add gnu_dev_ prefix to function definitions. Adjust macro expansions accordingly. * sysdeps/unix/sysv/linux/Versions: Add gnu_dev_ prefix to major, minor, makedev name. * sysdeps/unix/sysv/linux/makedev.c: Likewise. 2003-09-24 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/sys/sysmacros.h (major, minor, makedev): Add __THROW.
Diffstat (limited to 'sysdeps/sparc')
-rw-r--r--sysdeps/sparc/sparc32/dl-machine.h15
-rw-r--r--sysdeps/sparc/sparc64/dl-machine.h15
2 files changed, 14 insertions, 16 deletions
diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h
index f43b4788ef..cd409ae57c 100644
--- a/sysdeps/sparc/sparc32/dl-machine.h
+++ b/sysdeps/sparc/sparc32/dl-machine.h
@@ -248,6 +248,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
/* The SPARC overlaps DT_RELA and DT_PLTREL. */
#define ELF_MACHINE_PLTREL_OVERLAP 1
+/* Undo the sub %sp, 6*4, %sp; add %sp, 22*4, %o0 below to get at the
+ value we want in __libc_stack_end. */
+#define DL_STACK_END(cookie) \
+ ((void *) (((long) (cookie)) - (22 - 6) * 4))
+
/* Initial entry point code for the dynamic linker.
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point. */
@@ -274,16 +279,10 @@ _dl_start_user:\n\
add %l7, %o7, %l7\n\
/* Save the user entry point address in %l0 */\n\
mov %o0, %l0\n\
- /* Store the highest stack address. */\n\
- sethi %hi(__libc_stack_end), %g2\n\
- or %g2, %lo(__libc_stack_end), %g2\n\
- ld [%l7 + %g2], %l1\n\
- sethi %hi(_dl_skip_args), %g2\n\
- add %sp, 6*4, %l2\n\
- or %g2, %lo(_dl_skip_args), %g2\n\
- st %l2, [%l1]\n\
/* See if we were run as a command with the executable file name as an\n\
extra leading argument. If so, adjust the contents of the stack. */\n\
+ sethi %hi(_dl_skip_args), %g2\n\
+ or %g2, %lo(_dl_skip_args), %g2\n\
ld [%l7+%g2], %i0\n\
ld [%i0], %i0\n\
tst %i0\n\
diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h
index 5d87b4cb67..ad27e732bf 100644
--- a/sysdeps/sparc/sparc64/dl-machine.h
+++ b/sysdeps/sparc/sparc64/dl-machine.h
@@ -666,6 +666,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
/* The PLT uses Elf64_Rela relocs. */
#define elf_machine_relplt elf_machine_rela
+/* Undo the sub %sp, 6*8, %sp; add %sp, STACK_BIAS + 22*8, %o0 below
+ to get at the value we want in __libc_stack_end. */
+#define DL_STACK_END(cookie) \
+ ((void *) (((long) (cookie)) - (22 - 6) * 8 - STACK_BIAS))
+
/* Initial entry point code for the dynamic linker.
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point. */
@@ -694,20 +699,14 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
"1: call 11f\n" \
" sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7\n" \
"11: or %l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7\n" \
-" /* Store the highest stack address. */\n" \
-" sethi %hi(__libc_stack_end), %g5\n" \
+" sethi %hi(_dl_skip_args), %g5\n" \
" add %l7, %o7, %l7\n" \
-" or %g5, %lo(__libc_stack_end), %g5\n" \
+" or %g5, %lo(_dl_skip_args), %g5\n" \
" /* Save the user entry point address in %l0. */\n" \
" mov %o0, %l0\n" \
-" ldx [%l7 + %g5], %l1\n" \
-" sethi %hi(_dl_skip_args), %g5\n" \
-" add %sp, 6*8, %l2\n" \
" /* See if we were run as a command with the executable file name as an\n" \
" extra leading argument. If so, we must shift things around since we\n" \
" must keep the stack doubleword aligned. */\n" \
-" or %g5, %lo(_dl_skip_args), %g5\n" \
-" stx %l2, [%l1]\n" \
" ldx [%l7 + %g5], %i0\n" \
" ld [%i0], %i0\n" \
" brz,pt %i0, 2f\n" \