1
0
mirror of https://github.com/golang/go synced 2024-11-18 08:54:45 -07:00

cmd/link/internal/ld: Skip combining dwarf for darwin/arm.

Change-Id: I3a6df0a76d57db7cb6910f4179a6ce380f219a37
Reviewed-on: https://go-review.googlesource.com/10442
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Ryan Brown 2015-04-08 12:55:34 -07:00 committed by David Crawshaw
parent 8b186df731
commit 5ee552815c

View File

@ -1055,21 +1055,24 @@ func hostlink() {
} }
if Debug['s'] == 0 && debug_s == 0 && HEADTYPE == obj.Hdarwin { if Debug['s'] == 0 && debug_s == 0 && HEADTYPE == obj.Hdarwin {
dsym := fmt.Sprintf("%s/go.dwarf", tmpdir) // Skip combining dwarf on arm.
if out, err := exec.Command("dsymutil", "-f", outfile, "-o", dsym).CombinedOutput(); err != nil { if Thearch.Thechar != '5' && Thearch.Thechar != '7' {
Ctxt.Cursym = nil dsym := fmt.Sprintf("%s/go.dwarf", tmpdir)
Exitf("%s: running dsymutil failed: %v\n%s", os.Args[0], err, out) if out, err := exec.Command("dsymutil", "-f", outfile, "-o", dsym).CombinedOutput(); err != nil {
} Ctxt.Cursym = nil
combinedOutput := fmt.Sprintf("%s/go.combined", tmpdir) Exitf("%s: running dsymutil failed: %v\n%s", os.Args[0], err, out)
if err := machoCombineDwarf(outfile, dsym, combinedOutput); err != nil { }
Ctxt.Cursym = nil combinedOutput := fmt.Sprintf("%s/go.combined", tmpdir)
Exitf("%s: combining dwarf failed: %v", os.Args[0], err) if err := machoCombineDwarf(outfile, dsym, combinedOutput); err != nil {
} Ctxt.Cursym = nil
origOutput := fmt.Sprintf("%s/go.orig", tmpdir) Exitf("%s: combining dwarf failed: %v", os.Args[0], err)
os.Rename(outfile, origOutput) }
if err := os.Rename(combinedOutput, outfile); err != nil { origOutput := fmt.Sprintf("%s/go.orig", tmpdir)
Ctxt.Cursym = nil os.Rename(outfile, origOutput)
Exitf("%s: rename(%s, %s) failed: %v", os.Args[0], combinedOutput, outfile, err) if err := os.Rename(combinedOutput, outfile); err != nil {
Ctxt.Cursym = nil
Exitf("%s: rename(%s, %s) failed: %v", os.Args[0], combinedOutput, outfile, err)
}
} }
} }
} }