mirror of https://github.com/golang/go.git
cmd/link: update flag doc
Update the go doc for linker flags. Remove flags that no longer exist. Also remove flags that are intended for debugging the linker from user docs. Add -aslr to the doc. The -n flag does nothing except print a nearly useless message on XCOFF linking. Deprecate it. Fixes #64476. Change-Id: I518c9c6cc009eae50b7c11308348524ad6a62b69 Reviewed-on: https://go-review.googlesource.com/c/go/+/546615 Reviewed-by: Than McIntosh <thanm@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
70c7fb75e9
commit
40f6fbf147
|
|
@ -43,10 +43,10 @@ Flags:
|
|||
or initialized to a constant string expression. -X will not work if the initializer makes
|
||||
a function call or refers to other variables.
|
||||
Note that before Go 1.5 this option took two separate arguments.
|
||||
-a
|
||||
Disassemble output.
|
||||
-asan
|
||||
Link with C/C++ address sanitizer support.
|
||||
-aslr
|
||||
Enable ASLR for buildmode=c-shared on windows (default true).
|
||||
-buildid id
|
||||
Record id as Go toolchain build id.
|
||||
-buildmode mode
|
||||
|
|
@ -64,8 +64,6 @@ Flags:
|
|||
The dynamic header is on by default, even without any
|
||||
references to dynamic libraries, because many common
|
||||
system tools now assume the presence of the header.
|
||||
-debugtramp int
|
||||
Debug trampolines.
|
||||
-dumpdep
|
||||
Dump symbol dependency graph.
|
||||
-extar ar
|
||||
|
|
@ -104,8 +102,6 @@ Flags:
|
|||
Set runtime.MemProfileRate to rate.
|
||||
-msan
|
||||
Link with C/C++ memory sanitizer support.
|
||||
-n
|
||||
Dump symbol table.
|
||||
-o file
|
||||
Write output to file (default a.out, or a.out.exe on Windows).
|
||||
-pluginpath path
|
||||
|
|
@ -116,13 +112,9 @@ Flags:
|
|||
Link with race detection libraries.
|
||||
-s
|
||||
Omit the symbol table and debug information.
|
||||
-shared
|
||||
Generated shared object (implies -linkmode external; experimental).
|
||||
-tmpdir dir
|
||||
Write temporary files to dir.
|
||||
Temporary files are only used in external linking mode.
|
||||
-u
|
||||
Reject unsafe packages.
|
||||
-v
|
||||
Print trace of linker operations.
|
||||
-w
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ var (
|
|||
flagF = flag.Bool("f", false, "ignore version mismatch")
|
||||
flagG = flag.Bool("g", false, "disable go package data checks")
|
||||
flagH = flag.Bool("h", false, "halt on error")
|
||||
flagN = flag.Bool("n", false, "dump symbol table")
|
||||
flagN = flag.Bool("n", false, "no-op (deprecated)")
|
||||
FlagS = flag.Bool("s", false, "disable symbol table")
|
||||
flag8 bool // use 64-bit addresses in symbol table
|
||||
flagInterpreter = flag.String("I", "", "use `linker` as ELF dynamic linker")
|
||||
|
|
|
|||
|
|
@ -1140,7 +1140,7 @@ func (f *xcoffFile) asmaixsym(ctxt *Link) {
|
|||
putaixsym(ctxt, s, TextSym)
|
||||
}
|
||||
|
||||
if ctxt.Debugvlog != 0 || *flagN {
|
||||
if ctxt.Debugvlog != 0 {
|
||||
ctxt.Logf("symsize = %d\n", uint32(symSize))
|
||||
}
|
||||
xfile.updatePreviousFile(ctxt, true)
|
||||
|
|
|
|||
Loading…
Reference in New Issue