]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.link] cmd/asm: expand package path if known
authorCherry Zhang <cherryyz@google.com>
Mon, 18 May 2020 22:27:10 +0000 (18:27 -0400)
committerCherry Zhang <cherryyz@google.com>
Tue, 19 May 2020 14:53:54 +0000 (14:53 +0000)
If the package path is known, pass it to the object file writer
so the symbol names are pre-expanded. (We already expand the
package path in debug info.)

Change-Id: I2b2b71edbb98924cbf3c4f9142b7e109e5b7501a
Reviewed-on: https://go-review.googlesource.com/c/go/+/234491
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/asm/main.go

index 71ee04128cbfc64b347c426c2ab12ac91a809224..4a5dfecf6d9e2af3e4d34da50870df2f303bad99 100644 (file)
@@ -97,7 +97,7 @@ func main() {
        }
        if ok && !*flags.SymABIs {
                ctxt.NumberSyms(true)
-               obj.WriteObjFile(ctxt, buf, "")
+               obj.WriteObjFile(ctxt, buf, *flags.Importpath)
        }
        if !ok || diag {
                if failedFile != "" {