...

Source file src/cmd/asm/doc.go

     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 name[=value]
    23			Predefine symbol name with an optional simple value.
    24			Can be repeated to define multiple symbols.
    25		-I dir1 -I dir2
    26			Search for #include files in dir1, dir2, etc,
    27			after consulting $GOROOT/pkg/$GOOS_$GOARCH.
    28		-S
    29			Print assembly and machine code.
    30		-V
    31			Print assembler version and exit.
    32		-debug
    33			Dump instructions as they are parsed.
    34		-dynlink
    35			Support references to Go symbols defined in other shared libraries.
    36		-o file
    37			Write output to file. The default is foo.o for /a/b/c/foo.s.
    38		-shared
    39			Generate code that can be linked into a shared library.
    40		-trimpath prefix
    41			Remove prefix from recorded source file paths.
    42		-gensymabis
    43			Write symbol ABI information to output file. Don't assemble.
    44	Input language:
    45	
    46	The assembler uses mostly the same syntax for all architectures,
    47	the main variation having to do with addressing modes. Input is
    48	run through a simplified C preprocessor that implements #include,
    49	#define, #ifdef/endif, but not #if or ##.
    50	
    51	For more information, see https://golang.org/doc/asm.
    52	*/
    53	package main
    54	

View as plain text