cmd/go: make asm the first assembler

verifyAsm is still on, but this CL changes the order to asm then 6a.
Before, it was 6a then asm, but that meant that any bugs in asm
for bad input would be prevented from happening because 6a would
catch them. Now asm gets first crack, as it must.

Also implement the -trimpath flag in asm. It's necessary and trivial.

Change-Id: Ifb2ab870de1aa1b53dec76a78ac697a0d36fa80a
Reviewed-on: https://go-review.googlesource.com/5850
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Rob Pike 2015-02-24 14:28:49 -08:00
parent 3e9e9b4822
commit 4100f7d95c
3 changed files with 5 additions and 4 deletions

View file

@ -40,6 +40,7 @@ func main() {
if *flags.PrintOut {
ctxt.Debugasm = 1
}
ctxt.Trimpath = *flags.TrimPath
ctxt.Bso = obj.Binitw(os.Stdout)
defer obj.Bflush(ctxt.Bso)
ctxt.Diag = log.Fatalf