Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 28 Oct 2020 12:48:02 +1100
From: Patrick Oppenlander <>
Cc: unicorn_wang <>
Subject: Re: [Question] about arch/riscv64/crt_arch.h

On Wed, Oct 28, 2020 at 12:40 PM Chen Wang <> wrote:
> hi,
> I'm reading musl (1.2.1) code for riscv. In arch/riscv64/crt_arch.h,
> __asm__(
> ......
> "andi sp, sp, -16\n\t" // <--- why do we need this?
> "tail " START "_c"
> );

I'm not familiar with RISC-V, but it's there to guarantee that the
stack is 16-byte aligned which must be either an architectural or ABI

Perhaps the kernel can start the process with a more relaxed stack
alignment. Otherwise it's there for safety (paranoia).


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.