* [PATCH] RISC-V: Add _dl_start_user.
@ 2020-11-10 0:53 Jim Wilson
2020-11-10 1:06 ` Andrew Waterman
2020-11-10 19:03 ` DJ Delorie
0 siblings, 2 replies; 5+ messages in thread
From: Jim Wilson @ 2020-11-10 0:53 UTC (permalink / raw)
To: libc-alpha
This is required for the debugglibc.sh script to work. Tested by
successfully using this patched script, and a riscv64-linux testsuite
run.
We could perhaps call RTLD_EPILOGUE for ENTRY_POINT before calling
RTLD_PROLOGUE for _dl_start_user, but I don't think it matters.
OK?
Jim
---
sysdeps/riscv/dl-machine.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sysdeps/riscv/dl-machine.h b/sysdeps/riscv/dl-machine.h
index 03db94aeba..511140864e 100644
--- a/sysdeps/riscv/dl-machine.h
+++ b/sysdeps/riscv/dl-machine.h
@@ -105,6 +105,7 @@ elf_machine_load_address (void)
" _RTLD_PROLOGUE (ENTRY_POINT) "\
mv a0, sp\n\
jal _dl_start\n\
+ " _RTLD_PROLOGUE (_dl_start_user) "\
# Stash user entry point in s0.\n\
mv s0, a0\n\
# See if we were run as a command with the executable file\n\
@@ -131,7 +132,8 @@ elf_machine_load_address (void)
lla a0, _dl_fini\n\
# Jump to the user entry point.\n\
jr s0\n\
- " _RTLD_EPILOGUE (ENTRY_POINT) "\
+ " _RTLD_EPILOGUE (ENTRY_POINT) \
+ _RTLD_EPILOGUE (_dl_start_user) "\
.previous" \
);
--
2.25.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] RISC-V: Add _dl_start_user.
2020-11-10 0:53 [PATCH] RISC-V: Add _dl_start_user Jim Wilson
@ 2020-11-10 1:06 ` Andrew Waterman
2020-11-10 16:44 ` Jim Wilson
2020-11-10 19:03 ` DJ Delorie
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Waterman @ 2020-11-10 1:06 UTC (permalink / raw)
To: Jim Wilson; +Cc: libc-alpha
LGTM.
On Mon, Nov 9, 2020 at 4:53 PM Jim Wilson <jimw@sifive.com> wrote:
>
> This is required for the debugglibc.sh script to work. Tested by
> successfully using this patched script, and a riscv64-linux testsuite
> run.
>
> We could perhaps call RTLD_EPILOGUE for ENTRY_POINT before calling
> RTLD_PROLOGUE for _dl_start_user, but I don't think it matters.
>
> OK?
>
> Jim
> ---
> sysdeps/riscv/dl-machine.h | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/sysdeps/riscv/dl-machine.h b/sysdeps/riscv/dl-machine.h
> index 03db94aeba..511140864e 100644
> --- a/sysdeps/riscv/dl-machine.h
> +++ b/sysdeps/riscv/dl-machine.h
> @@ -105,6 +105,7 @@ elf_machine_load_address (void)
> " _RTLD_PROLOGUE (ENTRY_POINT) "\
> mv a0, sp\n\
> jal _dl_start\n\
> + " _RTLD_PROLOGUE (_dl_start_user) "\
> # Stash user entry point in s0.\n\
> mv s0, a0\n\
> # See if we were run as a command with the executable file\n\
> @@ -131,7 +132,8 @@ elf_machine_load_address (void)
> lla a0, _dl_fini\n\
> # Jump to the user entry point.\n\
> jr s0\n\
> - " _RTLD_EPILOGUE (ENTRY_POINT) "\
> + " _RTLD_EPILOGUE (ENTRY_POINT) \
> + _RTLD_EPILOGUE (_dl_start_user) "\
> .previous" \
> );
>
> --
> 2.25.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] RISC-V: Add _dl_start_user.
2020-11-10 1:06 ` Andrew Waterman
@ 2020-11-10 16:44 ` Jim Wilson
2020-11-21 0:36 ` Palmer Dabbelt
0 siblings, 1 reply; 5+ messages in thread
From: Jim Wilson @ 2020-11-10 16:44 UTC (permalink / raw)
To: Andrew Waterman; +Cc: GNU C Library
On Mon, Nov 9, 2020 at 5:06 PM Andrew Waterman <andrew@sifive.com> wrote:
> LGTM.
>
I don't have glibc write access, so I would need someone else to commit
this for me.
Jim
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] RISC-V: Add _dl_start_user.
2020-11-10 0:53 [PATCH] RISC-V: Add _dl_start_user Jim Wilson
2020-11-10 1:06 ` Andrew Waterman
@ 2020-11-10 19:03 ` DJ Delorie
1 sibling, 0 replies; 5+ messages in thread
From: DJ Delorie @ 2020-11-10 19:03 UTC (permalink / raw)
To: Jim Wilson; +Cc: libc-alpha
Jim Wilson <jimw@sifive.com> writes:
> This is required for the debugglibc.sh script to work. Tested by
> successfully using this patched script, and a riscv64-linux testsuite
> run.
>
> We could perhaps call RTLD_EPILOGUE for ENTRY_POINT before calling
> RTLD_PROLOGUE for _dl_start_user, but I don't think it matters.
Pushed. Thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] RISC-V: Add _dl_start_user.
2020-11-10 16:44 ` Jim Wilson
@ 2020-11-21 0:36 ` Palmer Dabbelt
0 siblings, 0 replies; 5+ messages in thread
From: Palmer Dabbelt @ 2020-11-21 0:36 UTC (permalink / raw)
To: Jim Wilson; +Cc: Andrew Waterman, libc-alpha
On Tue, 10 Nov 2020 08:44:59 PST (-0800), Jim Wilson wrote:
> On Mon, Nov 9, 2020 at 5:06 PM Andrew Waterman <andrew@sifive.com> wrote:
>
>> LGTM.
>>
>
> I don't have glibc write access, so I would need someone else to commit
> this for me.
Looks like someone did? I don't see anything on the thread, but I do in git.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-11-21 0:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10 0:53 [PATCH] RISC-V: Add _dl_start_user Jim Wilson
2020-11-10 1:06 ` Andrew Waterman
2020-11-10 16:44 ` Jim Wilson
2020-11-21 0:36 ` Palmer Dabbelt
2020-11-10 19:03 ` DJ Delorie
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).