github.com/FenixAra/go@v0.0.0-20170127160404-96ea0918e670/src/cmd/asm/doc.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 /* 6 Asm, typically invoked as ``go tool asm'', assembles the source file into an object 7 file named for the basename of the argument source file with a .o suffix. The 8 object file can then be combined with other objects into a package archive. 9 10 Command Line 11 12 Usage: 13 14 go tool asm [flags] file 15 16 The specified file must be a Go assembly file. 17 The same assembler is used for all target operating systems and architectures. 18 The GOOS and GOARCH environment variables set the desired target. 19 20 Flags: 21 22 -D value 23 predefined symbol with optional simple value -D=identifier=value; 24 can be set multiple times 25 -I value 26 include directory; can be set multiple times 27 -S print assembly and machine code 28 -debug 29 dump instructions as they are parsed 30 -dynlink 31 support references to Go symbols defined in other shared libraries 32 -o string 33 output file; default foo.o for /a/b/c/foo.s 34 -shared 35 generate code that can be linked into a shared library 36 -trimpath string 37 remove prefix from recorded source file paths 38 39 Input language: 40 41 The assembler uses mostly the same syntax for all architectures, 42 the main variation having to do with addressing modes. Input is 43 run through a simplified C preprocessor that implements #include, 44 #define, #ifdef/endif, but not #if or ##. 45 46 For more information, see https://golang.org/doc/asm. 47 */ 48 package main