-
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/compile: dedup gclocals at compile time #14983
Labels
Milestone
Comments
it's working as intended. gclocals are content addressable symbols
so the linker will deduplicate them. As the compiler is compiling one
function at a time, or it currently doesn't know that a matching gclocals
symbol has already been emitted.
Perhaps the compiler should check if a matching gclocals has already
been emitted before emitting a new one.
|
Yes the linker will deduplicate but this should be done by the compiler ahead of time. |
Oh wow, I had no idea each .o file contained multiple copies of the gclocals symbols. |
CL https://golang.org/cl/22293 mentions this issue. |
Nice! Thanks. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Version:
go version devel +4ffa5eb Sun Mar 27 05:31:54 2016 +0000 linux/amd64
Env:
The symbol duplication factor is ~3.5x.
The text was updated successfully, but these errors were encountered: