[dev.link] cmd/asm: expand package path if known

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>
diff --git a/src/cmd/asm/main.go b/src/cmd/asm/main.go
index 71ee041..4a5dfec 100644
--- a/src/cmd/asm/main.go
+++ b/src/cmd/asm/main.go
@@ -97,7 +97,7 @@
 	}
 	if ok && !*flags.SymABIs {
 		ctxt.NumberSyms(true)
-		obj.WriteObjFile(ctxt, buf, "")
+		obj.WriteObjFile(ctxt, buf, *flags.Importpath)
 	}
 	if !ok || diag {
 		if failedFile != "" {