public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] alpha: Remove _dl_skip_args usage
Date: Mon, 30 May 2022 20:49:05 +0000 (GMT)	[thread overview]
Message-ID: <20220530204905.AD8343857BBE@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1e4fb2e1ab7dc0b90c0ded24f15088d29fa143cd

commit 1e4fb2e1ab7dc0b90c0ded24f15088d29fa143cd
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu May 26 13:00:48 2022 -0300

    alpha: Remove _dl_skip_args usage
    
    Since ad43cac44a the generic code already shuffles the argv/envp/auxv
    on the stack to remove the ld.so own arguments and thus _dl_skip_args
    is always 0.  It makes the fixup_stack branch ununsed.
    
    Checked with qemu-user that arguments are correctly passed on both
    constructors and main program.
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>

Diff:
---
 sysdeps/alpha/dl-machine.h | 41 -----------------------------------------
 1 file changed, 41 deletions(-)

diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index ccee972c96..f0ba8e88af 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -156,12 +156,6 @@ _dl_start_user:							\n\
 	.prologue 0						\n\
 	/* Save the user entry point address in s0.  */		\n\
 	mov	$0, $9						\n\
-	/* See if we were run as a command with the executable	\n\
-	   file name as an extra leading argument.  */		\n\
-	ldah	$1, _dl_skip_args($gp)	!gprelhigh		\n\
-	ldl	$1, _dl_skip_args($1)	!gprellow		\n\
-	bne	$1, $fixup_stack				\n\
-$fixup_stack_ret:						\n\
 	/* The special initializer gets called with the stack	\n\
 	   just as the application's entry point will see it;	\n\
 	   it can switch stacks if it moves these contents	\n\
@@ -182,41 +176,6 @@ $fixup_stack_ret:						\n\
 	/* Jump to the user's entry point.  */			\n\
 	mov	$9, $27						\n\
 	jmp	($9)						\n\
-$fixup_stack:							\n\
-	/* Adjust the stack pointer to skip _dl_skip_args words.\n\
-	   This involves copying everything down, since the	\n\
-	   stack pointer must always be 16-byte aligned.  */	\n\
-	ldah	$7, __GI__dl_argv($gp) !gprelhigh		\n\
-	ldq	$2, 0($sp)					\n\
-	ldq	$5, __GI__dl_argv($7) !gprellow			\n\
-	subq	$31, $1, $6					\n\
-	subq	$2, $1, $2					\n\
-	s8addq	$6, $5, $5					\n\
-	mov	$sp, $4						\n\
-	s8addq	$1, $sp, $3					\n\
-	stq	$2, 0($sp)					\n\
-	stq	$5, __GI__dl_argv($7) !gprellow			\n\
-	/* Copy down argv.  */					\n\
-0:	ldq	$5, 8($3)					\n\
-	addq	$4, 8, $4					\n\
-	addq	$3, 8, $3					\n\
-	stq	$5, 0($4)					\n\
-	bne	$5, 0b						\n\
-	/* Copy down envp.  */					\n\
-1:	ldq	$5, 8($3)					\n\
-	addq	$4, 8, $4					\n\
-	addq	$3, 8, $3					\n\
-	stq	$5, 0($4)					\n\
-	bne	$5, 1b						\n\
-	/* Copy down auxiliary table.  */			\n\
-2:	ldq	$5, 8($3)					\n\
-	ldq	$6, 16($3)					\n\
-	addq	$4, 16, $4					\n\
-	addq	$3, 16, $3					\n\
-	stq	$5, -8($4)					\n\
-	stq	$6, 0($4)					\n\
-	bne	$5, 2b						\n\
-	br	$fixup_stack_ret				\n\
 	.end _dl_start_user					\n\
 	.set noat						\n\
 .previous");


                 reply	other threads:[~2022-05-30 20:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220530204905.AD8343857BBE@sourceware.org \
    --to=azanella@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).