diff options
author | Hiroshi Ioka <hirochachacha@gmail.com> | 2017-10-02 08:17:15 +0900 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2017-11-10 20:11:20 +0000 |
commit | dc3a4e4bca1eb0fed3304d22875ca26964091e82 (patch) | |
tree | d84ec501f6841bdb3aa4835664deea4b6dfd7630 /src/cmd/objdump | |
parent | 3af20c06fe206ff92a8111fe230deb0170dac33d (diff) | |
download | go-dc3a4e4bca1eb0fed3304d22875ca26964091e82.tar.gz go-dc3a4e4bca1eb0fed3304d22875ca26964091e82.zip |
cmd/objdump: pass the correct execution mode to x86asm.Decode in disasm_x86 on 386
Fixes #22093
Fixes #19988
Change-Id: Ibd8ec89e091fd527f363999e484676931d7aa6e2
Reviewed-on: https://go-review.googlesource.com/67450
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/objdump')
-rw-r--r-- | src/cmd/objdump/objdump_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cmd/objdump/objdump_test.go b/src/cmd/objdump/objdump_test.go index f0771cdde9..a2ca329609 100644 --- a/src/cmd/objdump/objdump_test.go +++ b/src/cmd/objdump/objdump_test.go @@ -148,6 +148,13 @@ func testDisasm(t *testing.T, printCode bool, flags ...string) { ok = false } } + if goarch == "386" { + if strings.Contains(text, "(IP)") { + t.Errorf("disassembly contains PC-Relative addressing on 386") + ok = false + } + } + if !ok { t.Logf("full disassembly:\n%s", text) } @@ -234,6 +241,12 @@ func TestDisasmGoobj(t *testing.T) { ok = false } } + if runtime.GOARCH == "386" { + if strings.Contains(text, "(IP)") { + t.Errorf("disassembly contains PC-Relative addressing on 386") + ok = false + } + } if !ok { t.Logf("full disassembly:\n%s", text) } |