1
0
mirror of https://github.com/golang/go synced 2024-11-11 21:10:21 -07:00

cmd/asm, cmd/compile, doc: document -spectre flags

Most of the docs are in the new wiki page
https://golang.org/wiki/Spectre.

Updates #37419.

Change-Id: I6e8f76670593c089de895e1665b41d874f879df9
Reviewed-on: https://go-review.googlesource.com/c/go/+/236599
Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
Russ Cox 2020-06-04 16:20:39 -04:00 committed by Austin Clements
parent 76f233fe04
commit b6faed1326
3 changed files with 13 additions and 4 deletions

View File

@ -246,7 +246,11 @@ TODO
</p> </p>
<p><!-- CL 222661 --> <p><!-- CL 222661 -->
TODO: -spectre flags Go 1.15 adds a <code>-spectre</code> flag to both the
compiler and the assembler, to allow enabling Spectre mitigations.
These should almost never be needed and are provided mainly as a
“defense in depth” mechanism.
See the <a href="https://github.com/golang/go/wiki/Spectre">Spectre wiki page</a> for details.
</p> </p>
<h2 id="linker">Linker</h2> <h2 id="linker">Linker</h2>
@ -276,7 +280,7 @@ TODO
These changes are part of a multi-release project These changes are part of a multi-release project
to <a href="https://golang.org/s/better-linker">modernize the Go to <a href="https://golang.org/s/better-linker">modernize the Go
linker</a>, meaning that there will be additional linker linker</a>, meaning that there will be additional linker
improvements expected in future releases. improvements expected in future releases.
</p> </p>
<h2 id="library">Core library</h2> <h2 id="library">Core library</h2>

View File

@ -33,14 +33,17 @@ Flags:
Dump instructions as they are parsed. Dump instructions as they are parsed.
-dynlink -dynlink
Support references to Go symbols defined in other shared libraries. Support references to Go symbols defined in other shared libraries.
-gensymabis
Write symbol ABI information to output file. Don't assemble.
-o file -o file
Write output to file. The default is foo.o for /a/b/c/foo.s. Write output to file. The default is foo.o for /a/b/c/foo.s.
-shared -shared
Generate code that can be linked into a shared library. Generate code that can be linked into a shared library.
-spectre list
Enable spectre mitigations in list (all, ret).
-trimpath prefix -trimpath prefix
Remove prefix from recorded source file paths. Remove prefix from recorded source file paths.
-gensymabis
Write symbol ABI information to output file. Don't assemble.
Input language: Input language:
The assembler uses mostly the same syntax for all architectures, The assembler uses mostly the same syntax for all architectures,

View File

@ -107,6 +107,8 @@ Flags:
Warn about composite literals that can be simplified. Warn about composite literals that can be simplified.
-shared -shared
Generate code that can be linked into a shared library. Generate code that can be linked into a shared library.
-spectre list
Enable spectre mitigations in list (all, index, ret).
-traceprofile file -traceprofile file
Write an execution trace to file. Write an execution trace to file.
-trimpath prefix -trimpath prefix