Skip to content
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

Open
benjaminp opened this Issue Mar 21, 2019 · 3 comments

Comments

Projects
None yet
5 participants
@benjaminp
Copy link

commented Mar 21, 2019

cmd/asm in Go 1.12.1 and before willingly assembles

TEXT ·MyFunc+0(SB), $0

However, 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.

@benjaminp benjaminp changed the title cmd/asm: inconsistent handling of explicit zero 0 offset on TEXT sudo cmd/asm: inconsistent handling of explicit zero 0 offset on TEXT pseudo Mar 21, 2019

@benjaminp benjaminp changed the title cmd/asm: inconsistent handling of explicit zero 0 offset on TEXT pseudo cmd/asm: inconsistent handling of explicit zero offset for TEXT pseudo Mar 21, 2019

@josharian

This comment has been minimized.

Copy link
Contributor

commented Mar 21, 2019

@ALTree ALTree added this to the Go1.13 milestone Mar 21, 2019

@cherrymui

This comment has been minimized.

Copy link
Contributor

commented Mar 22, 2019

I would guess that accepting +0 offset was not intentional. Maybe we should just reject it.

@robpike

This comment has been minimized.

Copy link
Contributor

commented Mar 22, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.