-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
link: add .eh_frame section for amd64/arm64 ELF binaries #47167
base: master
Are you sure you want to change the base?
Conversation
…odes for runtime.asmcgocall
This PR (HEAD: 03206a2) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/334231 to see it. Tip: You can toggle comments from me using the |
Message from Go Bot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/334231. |
Message from Than McIntosh: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/334231. |
Message from Cherry Mui: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/334231. |
Message from Than McIntosh: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/334231. |
Message from Steeve Morin: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/334231. |
Message from Cherry Mui: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/334231. |
Message from Than McIntosh: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/334231. |
Message from Steeve Morin: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/334231. |
Fixes #47166
For ELF binaries, add dwarf .eh_frame section with specific dwarf opcodes for runtime.asmcgocall.
When using cgo, this is needed to have a complete backtrace when the C code crashes ; otherwise, the backtrace stops at runtime.asmcgocall. This is due to the fact that runtime.asmcgocall switches the stack (Go stack <-> system stack).
The dwarf opcode for runtime.asmcgocall might probably be optimized.
Please note, even if the initial problem was on Android, this fixes should work on the other platforms supporting ELF binaries (tested successfully on Linux/amd64).