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/link: linker should fail quickly when external link mode is not supported #34373

Open
jeremyfaller opened this issue Sep 18, 2019 · 2 comments

Comments

@jeremyfaller
Copy link
Contributor

commented Sep 18, 2019

What version of Go are you using (go version)?

HEAD

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
darwin, 386

What did you do?

While investigating Issue 33808 I discovered that external linking doesn't work in 32bit darwin.

What did you expect to see?

Linker should fail quickly when trying to do an external link.

What did you see instead?

Linker calls external linker, external linker fails.

CC @cherrymui

@jeremyfaller jeremyfaller self-assigned this Sep 18, 2019
@jeremyfaller jeremyfaller changed the title cmd/link Linker fail quickly when external link mode is not supported cmd/link Linker should fail quickly when external link mode is not supported Sep 18, 2019
@jeremyfaller jeremyfaller changed the title cmd/link Linker should fail quickly when external link mode is not supported cmd/link Llinker should fail quickly when external link mode is not supported Sep 18, 2019
@jeremyfaller jeremyfaller changed the title cmd/link Llinker should fail quickly when external link mode is not supported cmd/link linker should fail quickly when external link mode is not supported Sep 18, 2019
@agnivade agnivade changed the title cmd/link linker should fail quickly when external link mode is not supported cmd/link: linker should fail quickly when external link mode is not supported Sep 19, 2019
@agnivade agnivade added the NeedsFix label Sep 19, 2019
@laboger

This comment has been minimized.

Copy link
Contributor

commented Oct 2, 2019

External linking is supported on ppc64le, but not on ppc64. If we try to link externally we see this:

go build -ldflags '-linkmode=external' hello.go
# command-line-arguments
/home/boger/golang/base/go/pkg/tool/linux_ppc64/link: external linking not supported for linux/ppc64
@jeremyfaller

This comment has been minimized.

Copy link
Contributor Author

commented Oct 2, 2019

Thanks, @laboger. The problem was discovered with darwin/32-bit (which for recent versions of darwin don't support external linking), and was filed as a generic bug. Thanks for checking PPC.

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