From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5E7EB3850429; Wed, 25 May 2022 13:27:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E7EB3850429 From: "adhemerval.zanella at linaro dot org" To: glibc-bugs@sourceware.org Subject: [Bug libc/29165] [Regression] broken argv adjustment Date: Wed, 25 May 2022 13:27:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.36 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: adhemerval.zanella at linaro dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2022 13:27:25 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29165 --- Comment #7 from Adhemerval Zanella --- My understanding is hppa has to create the synthetic frame layout and save = the kernel passed argc/argv so the loader can proper obtain them on _dl_sysdep_parse_arguments. The call frame is: _start=20 \_ _dl_start (void *arg) \_ _dl_start_final (void *arg) \_ _dl_sysdep_start (void *arg, ...) \_ _dl_sysdep_parse_arguments (void **start_argptr, ...) Once the loader setup _dl_argc and _dl_argc for the application, it does not matter the kernel passed argc/argv (there are already processed and should = not be visible by the application). (In reply to dave.anglin from comment #6) > It looks to me as if _dl_start doesn't call the user entrypoint directly.= =C2=A0 > It calls _start in start.S. _start > calls __libc_start_main with the argument setup shown in the comment in > sysdeps/hppa/start.S. >=20 > On 2022-05-25 8:41 a.m., adhemerval.zanella at linaro dot org wrote: > > https://sourceware.org/bugzilla/show_bug.cgi?id=3D29165 > > > > --- Comment #5 from Adhemerval Zanella --- > > But the start above will tail call _dl_start and _dl_start will call th= e user > > entrypoint that will eventually calls exit syscall. So I can't see why= matter > > restore r24 and r25 at this point, specially since they will point to t= he ld.so > > ones. > > > > (In reply to dave.anglin from comment #4) > >> But the comment says these are for (_start) in start.S. > >> > >> On 2022-05-25 7:57 a.m., adhemerval.zanella at linaro dot org wrote: > >>> I don't think it is required since _dl_fini does not have any argumen= ts. > >>> > >>> (In reply to dave.anglin from comment #2) > >>>> Thanks.=C2=A0 I think we need to keep the instructions that save and= restore r24 > >>>> and r25. > >>>> They will be clobbered by call to _dl_init. > >>>> > >>>> Will test. --=20 You are receiving this mail because: You are on the CC list for the bug.=