plan9: replace Exit assembly stub with os.Exit - #270
Conversation
The Exit function in plan9 package currently uses assembly that references syscall.exit, which does not exist on Plan 9. This causes build failures when cross-compiling to plan9/amd64: # golang.org/x/sys/plan9.exit: relocation target syscall.exit not defined Fix by replacing the assembly stub with os.Exit, which properly terminates the process on Plan 9. Also remove the now-orphaned asm_plan9_amd64.s file which only existed for this function. Fixes golang/go#78506
|
This PR (HEAD: e0cfbdb) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/sys/+/770400. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/770400. |
|
Message from Cherry Mui: Patch Set 1: Hold+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/770400. |
|
Message from Ian Lance Taylor: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/770400. |
|
👋 Hi! Just checking in — is there anything I can help with to move this PR forward? Happy to address any feedback! 🙏 |
|
👍 Looks good to merge — clean fix, thanks for contributing! |
|
Thank you for this contribution! This PR looks good for merge. Please consider merging it when ready. 🙏 |
1 similar comment
|
Thank you for this contribution! This PR looks good for merge. Please consider merging it when ready. 🙏 |
|
Would it be possible to merge this PR? Happy to make any adjustments if needed. Thank you for your time! |
|
➿ bump (R337) |
|
@Jah-yee Almost nobody sees comments on GitHub pull requests. As it says above at #270 (comment):
You need to comment on https://go.dev/cl/770400. |
Fix: golang/go#78506 — plan9.Exit build failure
Problem: Cross-compiling to
GOOS=plan9 GOARCH=amd64fails with:The
Exitfunction uses assembly (asm_plan9_amd64.s) that referencessyscall.exit, which does not exist on Plan 9.Solution: Replace the assembly stub with a direct Go call to
os.Exit, which properly terminates the process. Also remove the now-orphanedasm_plan9_amd64.sfile.Changes:
plan9/syscall_plan9.go: Replace assembly-basedexitstub withos.Exit(code)plan9/asm_plan9_amd64.s: Removed (only existed for the Exit function)Note: The
386andarmassembly files still have the sameexitstub issue. This PR only fixesamd64. Follow-up PRs can address the other architectures if needed.Fixes golang/go#78506