-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/asm: inconsistent handling of explicit zero offset for TEXT pseudo #30968
Comments
I would guess that accepting +0 offset was not intentional. Maybe we should just reject it. |
It was certainly intentional. The first example in the assembly document has that form, and that output came from a compiler. I don't think it should be rejected and there's nothing wrong with it. |
Change https://golang.org/cl/174537 mentions this issue: |
Change https://golang.org/cl/175757 mentions this issue: |
The compiler output shown in the doc is now quite old (most of the changes happened in Go 1.5). Update it to be more like what users will actually see. Also explain how to get literal machine code again. Prompted by #30968. Change-Id: I0ce139c3fe299ccc43e85b6aca81c6e0aac1a2df Reviewed-on: https://go-review.googlesource.com/c/go/+/175757 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rob Pike <r@golang.org>
cmd/asm
in Go 1.12.1 and before willingly assemblesHowever,
cmd/asm
in-gensymabis
mode doesn't recognize this line as a definition. That leads to esoteric symbol ABI errors during linking on Go 1.12.Either offset for the
TEXT
pseudo should be fully banned or-gensymabis
should handle explicit zero offsets.The text was updated successfully, but these errors were encountered: