runtime: add padding to Linux kernel structures sigcontext on loong64

On linux/loong64, the sc_extcontext member in the sigcontext structure is
required to be 16-byte aligned [1], although sc_extcontext is not currently
used anywhere, it still needs to be padded to the specified alignment.

[1] https://github.com/torvalds/linux/blob/master/arch/loongarch/include/uapi/asm/sigcontext.h

Change-Id: I98d30e921730314835c9469a6f28e186c9808e34
Reviewed-on: https://go-review.googlesource.com/c/go/+/591855
Reviewed-by: Qiqi Huang <huangqiqi@loongson.cn>
Reviewed-by: sophie zhao <zhaoxiaolin@loongson.cn>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
Guoqi Chen 2024-06-07 09:36:53 +08:00 committed by abner chenc
parent 5bd442aba3
commit 36e5c84ffa

View File

@ -184,6 +184,7 @@ type sigcontext struct {
sc_pc uint64
sc_regs [32]uint64
sc_flags uint32
sc_pad0 [1]uint32
sc_extcontext [0]uint64
}