aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/objdump/main.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-10-03 12:22:19 -0400
committerRuss Cox <rsc@golang.org>2014-10-03 12:22:19 -0400
commit904ec0098137f742e0dd96da3bc033d6a0b615d1 (patch)
tree6a05a91443927524fcb78ac82df0142d8e6ae71f /src/cmd/objdump/main.go
parentd42328c9f749140adf947833e0381fc639c32737 (diff)
parentc65a47f890e33eeed6ee9d8b6d965a5534fb6e0e (diff)
downloadgo-904ec0098137f742e0dd96da3bc033d6a0b615d1.tar.xz
[dev.garbage] merge default into dev.garbage
Diffstat (limited to 'src/cmd/objdump/main.go')
-rw-r--r--src/cmd/objdump/main.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/cmd/objdump/main.go b/src/cmd/objdump/main.go
index 1e4163296f..aafc501110 100644
--- a/src/cmd/objdump/main.go
+++ b/src/cmd/objdump/main.go
@@ -50,6 +50,9 @@ import (
"strconv"
"strings"
"text/tabwriter"
+
+ "cmd/internal/rsc.io/arm/armasm"
+ "cmd/internal/rsc.io/x86/x86asm"
)
var symregexp = flag.String("s", "", "only dump symbols matching this regexp")
@@ -199,14 +202,14 @@ func disasm_amd64(code []byte, pc uint64, lookup lookupFunc) (string, int) {
}
func disasm_x86(code []byte, pc uint64, lookup lookupFunc, arch int) (string, int) {
- inst, err := x86_Decode(code, 64)
+ inst, err := x86asm.Decode(code, 64)
var text string
size := inst.Len
if err != nil || size == 0 || inst.Op == 0 {
size = 1
text = "?"
} else {
- text = x86_plan9Syntax(inst, pc, lookup)
+ text = x86asm.Plan9Syntax(inst, pc, lookup)
}
return text, size
}
@@ -232,14 +235,14 @@ func (r textReader) ReadAt(data []byte, off int64) (n int, err error) {
}
func disasm_arm(code []byte, pc uint64, lookup lookupFunc) (string, int) {
- inst, err := arm_Decode(code, arm_ModeARM)
+ inst, err := armasm.Decode(code, armasm.ModeARM)
var text string
size := inst.Len
if err != nil || size == 0 || inst.Op == 0 {
size = 4
text = "?"
} else {
- text = arm_plan9Syntax(inst, pc, lookup, textReader{code, pc})
+ text = armasm.Plan9Syntax(inst, pc, lookup, textReader{code, pc})
}
return text, size
}