]> Cypherpunks repositories - gostls13.git/commitdiff
doc: various update to command documents
authorShenghou Ma <minux.ma@gmail.com>
Thu, 8 Mar 2012 17:31:09 +0000 (01:31 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Thu, 8 Mar 2012 17:31:09 +0000 (01:31 +0800)
        1. consistent usage section (go tool xxx)
        2. reformat cmd/ld document with minor correction
           document which -H flags are valid on which ld
           document -d flag can't be used on Windows.
           document -Hwindowsgui

R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/5782043

src/cmd/gc/doc.go
src/cmd/ld/doc.go
src/cmd/nm/doc.go

index 5a2977eab06a8dcf933deb2c3add54447c2f124a..163d3862c31c9a1a4ad994a12ada29a92a3a8c75 100644 (file)
@@ -26,7 +26,7 @@ package P to read the files of P's dependencies, only the compiled output
 of P.
 
 Usage:
-       6g [flags] file...
+       go tool 6g [flags] file...
 The specified files must be Go source files and all part of the same package.
 Substitute 6g with 8g or 5g where appropriate.
 
index 4728fccb8b43fc1da8cd322a448504c17040cfd7..e99e504668f1dffd7e617b3e4a3bd238394cacb7 100644 (file)
@@ -9,45 +9,52 @@ Ld is the portable code for a modified version of the Plan 9 linker.  The origin
        http://plan9.bell-labs.com/magic/man2html/1/2l
 
 It reads object files (.5, .6, or .8 files) and writes a binary named for the
-architecture (5.out, 6.out, 8.out) by default.
+architecture (5.out, 6.out, 8.out) by default (if $GOOS is windows, a .exe suffix
+will be appended).
 
 Major changes include:
-       - support for ELF and Mach-O binary files
+       - support for ELF, Mach-O and PE binary files
        - support for segmented stacks (this feature is implemented here, not in the compilers).
 
 Original options are listed on the manual page linked above.
 
-Options new in this version:
+Usage:
+       go tool 6l [flags] mainObj
+Substitute 6l with 8l or 5l as appropriate.
 
--d
-       Elide the dynamic linking header.  With this option, the binary
-       is statically linked and does not refer to dynld.  Without this option
-       (the default), the binary's contents are identical but it is loaded with dynld.
--Hdarwin
-       Write Apple Mach-O binaries (default when $GOOS is darwin)
--Hlinux
-       Write Linux ELF binaries (default when $GOOS is linux)
--Hfreebsd
-       Write FreeBSD ELF binaries (default when $GOOS is freebsd)
--Hnetbsd
-       Write NetBSD ELF binaries (default when $GOOS is netbsd)
--Hopenbsd
-       Write OpenBSD ELF binaries (default when $GOOS is openbsd)
--Hwindows
-       Write Windows PE32+ binaries (default when $GOOS is windows)
--I interpreter
-       Set the ELF dynamic linker to use.
--L dir1 -L dir2
-       Search for libraries (package files) in dir1, dir2, etc.
-       The default is the single location $GOROOT/pkg/$GOOS_amd64.
--r dir1:dir2:...
-       Set the dynamic linker search path when using ELF.
--V
-       Print the linker version.
--X symbol value
-       Set the value of an otherwise uninitialized string variable.
-       The symbol name should be of the form importpath.name,
-       as displayed in the symbol table printed by "go tool nm".
+Options new in this version:
 
+       -d
+               Elide the dynamic linking header.  With this option, the binary
+               is statically linked and does not refer to a dynamic linker.  Without this option
+               (the default), the binary's contents are identical but it is loaded with a dynamic
+               linker. This flag cannot be used when $GOOS is windows.
+       -Hdarwin     (only in 6l/8l)
+               Write Apple Mach-O binaries (default when $GOOS is darwin)
+       -Hlinux
+               Write Linux ELF binaries (default when $GOOS is linux)
+       -Hfreebsd    (only in 6l/8l)
+               Write FreeBSD ELF binaries (default when $GOOS is freebsd)
+       -Hnetbsd     (only in 6l/8l)
+               Write NetBSD ELF binaries (default when $GOOS is netbsd)
+       -Hopenbsd    (only in 6l/8l)
+               Write OpenBSD ELF binaries (default when $GOOS is openbsd)
+       -Hwindows    (only in 6l/8l)
+               Write Windows PE32+ Console binaries (default when $GOOS is windows)
+       -Hwindowsgui (only in 6l/8l)
+               Write Windows PE32+ GUI binaries
+       -I interpreter
+               Set the ELF dynamic linker to use.
+       -L dir1 -L dir2
+               Search for libraries (package files) in dir1, dir2, etc.
+               The default is the single location $GOROOT/pkg/$GOOS_$GOARCH.
+       -r dir1:dir2:...
+               Set the dynamic linker search path when using ELF.
+       -V
+               Print the linker version.
+       -X symbol value
+               Set the value of an otherwise uninitialized string variable.
+               The symbol name should be of the form importpath.name,
+               as displayed in the symbol table printed by "go tool nm".
 */
 package documentation
index 5e216b92238f93902a1e4112daaa0bbb53d88408..c84369a5fdc2a8a6401dd6fabb88ea8093bad366 100644 (file)
@@ -14,7 +14,8 @@ Plan 9 C compiler.
 This implementation adds the flag -S, which prints each symbol's size 
 in decimal after its address.
 
-It is installed as go tool nm and is architecture-independent.
+Usage:
+       go tool nm [-aghnsTu] file
 
 */
 package documentation