1
0
mirror of https://github.com/golang/go synced 2024-11-19 16:24:45 -07:00

cmd/objdump: set goarch properly on non-386 Plan 9 systems

LGTM=0intro, r
R=0intro, r
CC=ality, golang-codereviews, jas, mischief
https://golang.org/cl/108420043
This commit is contained in:
Aram Hăvărneanu 2014-07-09 12:32:49 +02:00
parent 38e75f9d0e
commit fa113cf767

View File

@ -34,7 +34,14 @@ func plan9Symbols(f *os.File) (syms []Sym, goarch string) {
return
}
switch p.Magic {
case plan9obj.MagicAMD64:
goarch = "amd64"
case plan9obj.Magic386:
goarch = "386"
case plan9obj.MagicARM:
goarch = "arm"
}
// Build sorted list of addresses of all symbols.
// We infer the size of a symbol by looking at where the next symbol begins.