about summary refs log tree commit diff
path: root/sysdeps/sparc/sparc32
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-11-16 02:17:26 +0000
committerUlrich Drepper <drepper@redhat.com>2000-11-16 02:17:26 +0000
commit85857f932b10330e5c96bedf15e81bcfc0207737 (patch)
tree24cb6d5dd63007daf1fd3d87171dc1c3ec838b8f /sysdeps/sparc/sparc32
parent821dcbccd172d8f35644cd6da81337cc739dde94 (diff)
downloadglibc-85857f932b10330e5c96bedf15e81bcfc0207737.tar.gz
glibc-85857f932b10330e5c96bedf15e81bcfc0207737.tar.xz
glibc-85857f932b10330e5c96bedf15e81bcfc0207737.zip
Update.
2000-11-15  Jakub Jelinek  <jakub@redhat.com>

	* dlfcn/default.c (main): Add test for dladdr of main returning
	argv[0] in dli_fname field.

2000-11-15  Jakub Jelinek  <jakub@redhat.com>

	* Makeconfig (run-program-prefix): Move test-static test into the
	variable.

	* sysdeps/alpha/dl-machine.h (RTLD_START): Update _dl_argv.
	* sysdeps/sparc/sparc32/dl-machine.h (RTLD_START): Likewise,
	schedule instructions.
	* sysdeps/sparc/sparc64/dl-machine.h (RTLD_START): Likewise,
	schedule instructions, fix a bug in copying auxiliary data.

	* manual/startup.texi (Program Arguments): Fix type of main's envp
	parameter.
	Reported by Raúl Núñez de Arenas Coronado <dervishd@linuxfreak.com>.
Diffstat (limited to 'sysdeps/sparc/sparc32')
-rw-r--r--sysdeps/sparc/sparc32/dl-machine.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h
index c1d423aa36..84d25cd10a 100644
--- a/sysdeps/sparc/sparc32/dl-machine.h
+++ b/sysdeps/sparc/sparc32/dl-machine.h
@@ -224,23 +224,29 @@ _dl_start_user:
 	sethi	%hi(__libc_stack_end), %g2
 	or	%g2, %lo(__libc_stack_end), %g2
 	ld	[%l7 + %g2], %l1
+	sethi	%hi(_dl_skip_args), %g2
 	add	%sp, 6*4, %l2
+	or	%g2, %lo(_dl_skip_args), %g2
 	st	%l2, [%l1]
   /* See if we were run as a command with the executable file name as an
      extra leading argument.  If so, adjust the contents of the stack.  */
-	sethi	%hi(_dl_skip_args), %g2
-	or	%g2, %lo(_dl_skip_args), %g2
 	ld	[%l7+%g2], %i0
 	ld	[%i0], %i0
 	tst	%i0
 	beq	3f
 	 ld	[%sp+22*4], %i5		/* load argc */
 	/* Find out how far to shift.  */
+	sethi	%hi(_dl_argv), %l3
+	or	%l3, %lo(_dl_argv), %l3
+	ld	[%l7+%l3], %l3
 	sub	%i5, %i0, %i5
+	ld	[%l3], %l4
 	sll	%i0, 2, %i2
 	st	%i5, [%sp+22*4]
+	sub	%l4, %i2, %l4
 	add	%sp, 23*4, %i1
 	add	%i1, %i2, %i2
+	st	%l4, [%l3]
 	/* Copy down argv */
 21:	ld	[%i2], %i3
 	add	%i2, 4, %i2