This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] RISC-V: Mark RA as undefined at the start of execution
- From: Andreas Schwab <schwab at suse dot de>
- To: Palmer Dabbelt <palmer at dabbelt dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 25 Sep 2018 13:42:29 +0200
- Subject: Re: [PATCH] RISC-V: Mark RA as undefined at the start of execution
- References: <20180519004953.19860-1-palmer@dabbelt.com>
On Mai 18 2018, Palmer Dabbelt <palmer@dabbelt.com> wrote:
> diff --git a/sysdeps/riscv/start.S b/sysdeps/riscv/start.S
> index 4635ddb5eb8c..93a80bc4a760 100644
> --- a/sysdeps/riscv/start.S
> +++ b/sysdeps/riscv/start.S
> @@ -43,6 +43,8 @@
> __libc_start_main wants this in a5. */
>
> ENTRY (ENTRY_POINT)
> + /* Mark ra as undefined in order to stop unwinding here! */
> + cfi_undefined (ra)
> call .Lload_gp
> mv a5, a0 /* rtld_fini. */
> /* main may be in a shared library. */
This will put the DW_CFA_undefined into the CIE, not the FDE, since it
isn't associated with an insn. You problably want to move it after the
call (CFI directives are always associated with the preceding insn).
The same issue exists with sysdeps/unix/sysv/linux/riscv/setcontext.S.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."