From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id E1D39384BC2C; Mon, 30 May 2022 20:49:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E1D39384BC2C Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc] arc: Remove _dl_skip_args usage X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/master X-Git-Oldrev: 49d877a80b29d3002887b084eec6676d9f5fec18 X-Git-Newrev: f20464e9e42514c11d7cbb630d33b49b35b2f202 Message-Id: <20220530204915.E1D39384BC2C@sourceware.org> Date: Mon, 30 May 2022 20:49:15 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2022 20:49:16 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f20464e9e42514c11d7cbb630d33b49b35b2f202 commit f20464e9e42514c11d7cbb630d33b49b35b2f202 Author: Adhemerval Zanella Date: Thu May 26 13:04:40 2022 -0300 arc: 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. So there is no need to adjust the argc or argv. Reviewed-by: Carlos O'Donell Diff: --- sysdeps/arc/dl-machine.h | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/sysdeps/arc/dl-machine.h b/sysdeps/arc/dl-machine.h index 4ac3848557..c6ad232384 100644 --- a/sysdeps/arc/dl-machine.h +++ b/sysdeps/arc/dl-machine.h @@ -161,29 +161,16 @@ __start: \n\ bl.d _dl_start \n\ mov_s r0, sp /* pass ptr to aux vector tbl. */ \n\ mov r13, r0 /* safekeep app elf entry point. */ \n\ - \n\ - /* (2). If ldso ran with executable as arg. */ \n\ - /* skip the extra args calc by dl_start. */ \n\ ld_s r1, [sp] /* orig argc. */ \n\ - ld r12, [pcl, _dl_skip_args@pcl] \n\ - breq r12, 0, 1f \n\ \n\ - add2 sp, sp, r12 /* discard argv entries from stack. */ \n\ - sub_s r1, r1, r12 /* adjusted argc on stack. */ \n\ - st_s r1, [sp] \n\ - add r2, sp, 4 \n\ - /* intermediate LD for ST emcoding limitations. */ \n\ - ld r3, [pcl, _dl_argv@gotpc] \n\ - st r2, [r3] \n\ -1: \n\ - /* (3). call preinit stuff. */ \n\ + /* (2). call preinit stuff. */ \n\ ld r0, [pcl, _rtld_local@pcl] \n\ add r2, sp, 4 ; argv \n\ add2 r3, r2, r1 \n\ add r3, r3, 4 ; env \n\ bl _dl_init@plt \n\ \n\ - /* (4) call app elf entry point. */ \n\ + /* (3) call app elf entry point. */ \n\ add r0, pcl, _dl_fini@pcl \n\ j [r13] \n\ \n\