about summary refs log tree commit diff
path: root/sysdeps/ia64
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-09-29 15:07:13 +0000
committerUlrich Drepper <drepper@redhat.com>2000-09-29 15:07:13 +0000
commit18ee9e67450c0d74fce7365aa6b1faceca817cba (patch)
tree2555f4a75d48fcb7b89d18c14fcf51c1db48c573 /sysdeps/ia64
parent623b05a4eec554729c613f4140fdcc56fcee52e1 (diff)
downloadglibc-18ee9e67450c0d74fce7365aa6b1faceca817cba.tar.gz
glibc-18ee9e67450c0d74fce7365aa6b1faceca817cba.tar.xz
glibc-18ee9e67450c0d74fce7365aa6b1faceca817cba.zip
(RTLD_START): Adjust _dl_argv by _dl_skip_args. (ELF_MACHINE_FIXED_STACK): Removed.
Diffstat (limited to 'sysdeps/ia64')
-rw-r--r--sysdeps/ia64/dl-machine.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/sysdeps/ia64/dl-machine.h b/sysdeps/ia64/dl-machine.h
index aedf2a35e5..1c37b24b4b 100644
--- a/sysdeps/ia64/dl-machine.h
+++ b/sysdeps/ia64/dl-machine.h
@@ -310,14 +310,24 @@ _dl_start_user:
 
 	     The stack pointer has to be 16 byte aligned. We cannot simply
 	     addjust the stack pointer. We have to move the whole argv and
-	     envp. H.J.  */
+	     envp and adjust _dl_argv by _dl_skip_args.  H.J.  */
 	}
-	{ .mmi
+	{ .mib
 	  ld8 out1 = [r10]	/* is argc actually stored as a long
 				   or as an int? */
+	  addl r2 = @ltoff(_dl_argv), gp
 	  ;;
+	}
+	{ .mmi
+	  ld8 r2 = [r2]		/* Get the address of _dl_argv. */
 	  sub out1 = out1, r3	/* Get the new argc. */
-	  shladd r15 = r3, 3, r11 /* The address of the argv we move */
+	  shladd r3 = r3, 3, r0
+	  ;;
+	}
+	{
+	  .mib
+	  ld8 r17 = [r2]	/* Get _dl_argv. */
+	  add r15 = r11, r3	/* The address of the argv we move */
 	  ;;
 	}
 	/* ??? Could probably merge these two loops into 3 bundles.
@@ -333,8 +343,9 @@ _dl_start_user:
 (p6)	  br.cond.dptk.few 1b
 	  ;;
 	}
-	{ .mib
+	{ .mmi
 	  mov out3 = r11
+	  sub r17 = r17, r3	/* Substract _dl_skip_args. */
 	  addl out0 = @ltoff(_dl_loaded), gp
 	}
 1:	/* Copy env. */
@@ -353,8 +364,9 @@ _dl_start_user:
 	  ld8 out0 = [out0]
 	  ;;
 	}
-	{ .mfb
+	{ .mmb
 	  ld8 out0 = [out0]		/* get the linkmap */
+	  st8 [r2] = r17		/* Load the new _dl_argv. */
 	  br.call.sptk.many b0 = _dl_init#
 	  ;;
 	}
@@ -402,10 +414,6 @@ _dl_start_user:
 /* According to the IA-64 specific documentation, Rela is always used.  */
 #define ELF_MACHINE_NO_REL 1
 
-/* Since ia64's stack has to be 16byte aligned, we cannot arbitrarily
-   move the stack pointer. */
-#define ELF_MACHINE_FIXED_STACK 1
-
 /* Return the address of the entry point. */
 extern ElfW(Addr) _dl_start_address (const struct link_map *map,
 				     ElfW(Addr) start);