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
Gollvm: Some existing defects #45881
Comments
Hi, As you are probably aware, we don't use the issue tracker for asking questions -- better to pose your questions on a mailing list or some other forum.
Gollvm supports //go:linkname, just in a different way from the main Go toolchain, since its runtime and standard library are implemented somewhat differently. In terms of using //go:linkname for non-functions, the limitations in gollvm relate to the use of the system linker. Gollvm has to emit ELF object files (in comparison with the main Go toolchain, which uses a custom object file, and which uses its own linker); because of this it seems unlikely that gollvm will support this use case any time soon. I'll add (once again) that using //go:linkname to "reach into" the runtime/stdlib and access unexported functions is highly non-portable and not covered by any Go compatibility guarantee. Such programs can be broken at any time by a new Go release.
Regarding the assembly syntax, there is no plan to add a "plan 9 to ELF syntax" translator, this would be a major undertaking. I would recommend that when you encounter build problems of this nature that you file bugs with the project hostig the assembly, requesting that they introduce a gccgo/gollvm build tag to pick up an alternate Go version of the function in question.
Relating to the other bugs, yes, hopefully someone (myself or another) will try to work on these as time permits. Gollvm is an open source project; things get done because developers contribute their time to help with it. Thanks. |
Note that simply converting Plan 9 asm to ELF is not enough, as the calling conventions are different. Even if wrote a translator, the resulting code would not work. So we would also have to generate some sort of ABI translation wrappers. |
Thank you for your response and reminder. We've talked about the problem of asm on golang-nuts several times:) |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I've tested gollvm on a large number of projects and that there are still some bugs in it.
Its robustness makes me uneasy
What did you expect to see?
I want to know if these bugs or defects are likely to be solved in a later version,
or if there is any way to overcome them
What did you see instead?
These bugs and defects include:
Access to private functions in the standard library through linkname is not allowed in gollvm, but this operation is not uncommon.
As discussed in golang-nuts
In addition,
go:linkname' is only supported for functions
Many projects rely on assembly functions implemented using plan9 syntax, which is not suppored by gollvm
This causes gollvm to be unavailable on these projects.
Maybe, compile the plan9 asm to an ELF object and add a bridge for it is possible?
-fsplit-stack
When compiling some projects using gollvm with a clang C compiler,the arg
-fsplit-stack
is add automatically, which leads to a backend err in llvmissue 41399 mentioned it
It seems that gollvm has not yet been very good support for this new feature
Details about it are here: issue 45880
I'd like to know if the fix of these bugs or defects is in your plan, and whether it is possible to fix them in subsequent versions
Thank you
The text was updated successfully, but these errors were encountered: