OLD | NEW |
1 // Copyright 2014 The Go Authors. All rights reserved. | 1 // Copyright 2014 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package main | 5 package main |
6 | 6 |
7 import ( | 7 import ( |
8 "bufio" | 8 "bufio" |
9 "bytes" | 9 "bytes" |
10 "fmt" | 10 "fmt" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 "fmthello.go:6", | 136 "fmthello.go:6", |
137 "TEXT main.main(SB)", | 137 "TEXT main.main(SB)", |
138 "JMP main.main(SB)", | 138 "JMP main.main(SB)", |
139 "CALL fmt.Println(SB)", | 139 "CALL fmt.Println(SB)", |
140 "RET", | 140 "RET", |
141 } | 141 } |
142 | 142 |
143 var armNeed = []string{ | 143 var armNeed = []string{ |
144 "fmthello.go:6", | 144 "fmthello.go:6", |
145 "TEXT main.main(SB)", | 145 "TEXT main.main(SB)", |
146 » "B.LS main.main(SB)", | 146 » //"B.LS main.main(SB)", // TODO(rsc): restore; golang.org/issue/9021 |
147 "BL fmt.Println(SB)", | 147 "BL fmt.Println(SB)", |
148 "RET", | 148 "RET", |
149 } | 149 } |
150 | 150 |
151 // objdump is fully cross platform: it can handle binaries | 151 // objdump is fully cross platform: it can handle binaries |
152 // from any known operating system and architecture. | 152 // from any known operating system and architecture. |
153 // We could in principle add binaries to testdata and check | 153 // We could in principle add binaries to testdata and check |
154 // all the supported systems during this test. However, the | 154 // all the supported systems during this test. However, the |
155 // binaries would be about 1 MB each, and we don't want to | 155 // binaries would be about 1 MB each, and we don't want to |
156 // add that much junk to the hg repository. Instead, build a | 156 // add that much junk to the hg repository. Instead, build a |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 testDisasm(t) | 202 testDisasm(t) |
203 } | 203 } |
204 | 204 |
205 func TestDisasmExtld(t *testing.T) { | 205 func TestDisasmExtld(t *testing.T) { |
206 switch runtime.GOOS { | 206 switch runtime.GOOS { |
207 case "plan9", "windows": | 207 case "plan9", "windows": |
208 t.Skipf("skipping on %s", runtime.GOOS) | 208 t.Skipf("skipping on %s", runtime.GOOS) |
209 } | 209 } |
210 testDisasm(t, "-ldflags=-linkmode=external") | 210 testDisasm(t, "-ldflags=-linkmode=external") |
211 } | 211 } |
OLD | NEW |