The Go Programming Language

Source file src/cmd/6l/doc.go

     1	// Copyright 2009 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	
     7	6l is a modified version of the Plan 9 linker.  The original is documented at
     8	
     9		http://plan9.bell-labs.com/magic/man2html/1/2l
    10	
    11	Its target architecture is the x86-64, referred to by these tools as amd64.
    12	It reads files in .6 format generated by 6g, 6c, and 6a and emits
    13	a binary called 6.out by default.
    14	
    15	Major changes include:
    16		- support for ELF and Mach-O binary files
    17		- support for segmented stacks (this feature is implemented here, not in the compilers).
    18	
    19	
    20	Original options are listed in the link above.
    21	
    22	Options new in this version:
    23	
    24	-d
    25		Elide the dynamic linking header.  With this option, the binary
    26		is statically linked and does not refer to dynld.  Without this option
    27		(the default), the binary's contents are identical but it is loaded with dynld.
    28	-e
    29		Emit an extra ELF-compatible symbol table useful with tools such as
    30		nm, gdb, and oprofile. This option makes the binary file considerably larger.
    31	-Hdarwin
    32		Write Apple Mach-O binaries (default when $GOOS is darwin)
    33	-Hlinux
    34		Write Linux ELF binaries (default when $GOOS is linux)
    35	-Hfreebsd
    36		Write FreeBSD ELF binaries (default when $GOOS is freebsd)
    37	-Hopenbsd
    38		Write OpenBSD ELF binaries (default when $GOOS is openbsd)
    39	-Hwindows
    40		Write Windows PE32+ binaries (default when $GOOS is windows)
    41	-I interpreter
    42		Set the ELF dynamic linker to use.
    43	-L dir1 -L dir2
    44		Search for libraries (package files) in dir1, dir2, etc.
    45		The default is the single location $GOROOT/pkg/$GOOS_amd64.
    46	-r dir1:dir2:...
    47		Set the dynamic linker search path when using ELF.
    48	-V
    49		Print the linker version.
    50	
    51	
    52	*/
    53	package documentation

release.r60.3. Except as noted, this content is licensed under a Creative Commons Attribution 3.0 License.