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: inline and simplify dosymtype #20205
Comments
I'll try encouraging someone to tackle this issue tomorrow on the go contributors workshop. |
Change https://golang.org/cl/171733 mentions this issue: |
Updates #20205 Change-Id: I44a7ee46a1cdc7fe6fd36c4db4c0dd87a19f7f5d Reviewed-on: https://go-review.googlesource.com/c/go/+/171733 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
I believe this issue should be closed since mentioned function is inlined and removed. :) |
@mwhudson's comment referenced in the OP was:
switch Buildmode {
case BuildmodeCArchive, BuildmodeCShared:
s := ctxt.Syms.ROLookup(*flagEntrySymbol)
if s != nil {
addinitarrdata(ctxt, s)
}
} CL 171733 inlined the code but did not do the simplification suggested. This issue was left open to do that simplification, if possible. I don't know enough about the linker to say whether that simplification is correct. |
These sorts of loops over ctxt.Syms.Allsym hunting for a specific symbol by name are one of the many things that we're trying to eliminate in the new linker. I'll send a CL on the dev.link branch. |
Change https://golang.org/cl/209838 mentions this issue: |
In the linker's symtab() function, avoid looping over the context's Syms.Allsyms array to locate the entry symbol when setting up the init array section; do an explicit ABI0 symbol lookup instead. This is a minor efficiency tweak / code cleanup. Fixes #20205. Change-Id: I2ebc17a3cb2cd63e9f5052bc80f1b0ac72c960e3 Reviewed-on: https://go-review.googlesource.com/c/go/+/209838 Run-TryBot: Than McIntosh <thanm@google.com> Reviewed-by: Jeremy Faller <jeremy@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
I've submitted https://golang.org/cl/209838 ... it might be a bit premature (given that the dev.link branch is not yet merged into master) but I'm going to close out the bug, with the expectation that we'll be doing the merge in the 1.15 timeframe. |
Per @mwhudson's comment at https://go-review.googlesource.com/c/40864/5/src/cmd/link/internal/ld/data.go#1143.
The text was updated successfully, but these errors were encountered: