plan9: replace Exit assembly stub with os.Exit#270
Open
Jah-yee wants to merge 1 commit intogolang:masterfrom
Open
plan9: replace Exit assembly stub with os.Exit#270Jah-yee wants to merge 1 commit intogolang:masterfrom
Jah-yee wants to merge 1 commit intogolang:masterfrom
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
Contributor
|
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:
|
Contributor
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/770400. |
Contributor
|
Message from Cherry Mui: Patch Set 1: Hold+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/770400. |
Contributor
|
Message from Ian Lance Taylor: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/770400. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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