github.com/alash3al/go@v0.0.0-20150827002835-d497eeb00540/src/cmd/link/main.go (about) 1 // Copyright 2015 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package main 6 7 import ( 8 "cmd/internal/obj" 9 "cmd/link/internal/amd64" 10 "cmd/link/internal/arm" 11 "cmd/link/internal/arm64" 12 "cmd/link/internal/ppc64" 13 "cmd/link/internal/x86" 14 "fmt" 15 "os" 16 ) 17 18 func main() { 19 switch obj.Getgoarch() { 20 default: 21 fmt.Fprintf(os.Stderr, "link: unknown architecture %q\n", obj.Getgoarch()) 22 os.Exit(2) 23 case "386": 24 x86.Main() 25 case "amd64", "amd64p32": 26 amd64.Main() 27 case "arm": 28 arm.Main() 29 case "arm64": 30 arm64.Main() 31 case "ppc64", "ppc64le": 32 ppc64.Main() 33 } 34 }