diff options
author | Joel Sing <joel@sing.id.au> | 2020-12-08 04:21:33 +1100 |
---|---|---|
committer | Joel Sing <joel@sing.id.au> | 2020-12-08 01:46:45 +0000 |
commit | 9c91cab0da9814a598f2c4f7568b6276ff972672 (patch) | |
tree | 4191d04c7a903ab44fcde09a18688053b8fccb4b /src/runtime/sys_openbsd_mips64.s | |
parent | 6362d01c152071751bd594bdf10c301514fc2d4e (diff) | |
download | go-9c91cab0da9814a598f2c4f7568b6276ff972672.tar.gz go-9c91cab0da9814a598f2c4f7568b6276ff972672.zip |
runtime: correct sigfwd on openbsd/mips64
Position independent code expects that R25 (aka $t9) contains the address of the
called function. As such, use R25 when calling from sigfwd.
Change-Id: I66b2b9bfa1f1bb983c7385eb2eaa19d9cd87d9fb
Reviewed-on: https://go-review.googlesource.com/c/go/+/275893
Trust: Joel Sing <joel@sing.id.au>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/runtime/sys_openbsd_mips64.s')
-rw-r--r-- | src/runtime/sys_openbsd_mips64.s | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/sys_openbsd_mips64.s b/src/runtime/sys_openbsd_mips64.s index 57a5dbd40e..3e4d209081 100644 --- a/src/runtime/sys_openbsd_mips64.s +++ b/src/runtime/sys_openbsd_mips64.s @@ -244,8 +244,8 @@ TEXT runtime·sigfwd(SB),NOSPLIT,$0-32 MOVW sig+8(FP), R4 MOVV info+16(FP), R5 MOVV ctx+24(FP), R6 - MOVV fn+0(FP), R7 - CALL (R7) // Alignment for ELF ABI? + MOVV fn+0(FP), R25 // Must use R25, needed for PIC code. + CALL (R25) RET TEXT runtime·sigtramp(SB),NOSPLIT,$192 |