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: external linker generates larger binaries than 6l/8l #5497
Milestone
Comments
For a simple case, external does generate a smaller binary: % cat x.go package main import "fmt" func main() { fmt.Printf("hello world\n") } % go build -ldflags '-linkmode internal' x.go % ls -l x -rwxr-xr-x 1 r staff 1525872 May 19 07:38 x % x hello world % go build -ldflags '-linkmode external' x.go % ls -l x -rwxr-xr-x 1 r staff 1167348 May 19 07:38 x % x hello world % So it's not so clear cut. (The -s flag produces similar ratios and slightly smaller binaries but the programs don't run; that's a different issue.) Labels changed: added priority-later, removed priority-triage. Owner changed to @ianlancetaylor. Status changed to Accepted. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
by unclejacksons:
The text was updated successfully, but these errors were encountered: