cmd/link: specify -Wl,-z params as documented
cmd/link: specify -Wl,-z params as documented

Both GNU and LLVM linkers de facto accept `-zPARAM`, and Go sometimes
does it. Inconsistently: there are more uses of `-z PARAM` than
`-zPARAM`:

    $ git grep -E -- '-Wl,-z[^,]' master | wc -l
    4
    $ git grep -E -- '-Wl,-z,' master | wc -l
    7

However, not adding a space between `-z` and the param is not
documented:

llvm-13:

    $ man ld.lld-13 | grep -E -A1 -w -- "^ +-z"
         -z option
                 Linker option extensions.

gnu ld:

    $ man ld | grep -E -A1 -w -- "^ +-z"
           -z keyword
               The recognized keywords are:
    --
           -z defs
               Report unresolved symbol references from regular object files.  This is done even if the linker is creating a non-symbolic
    --
           -z muldefs
               Normally when a symbol is defined multiple times, the linker will report a fatal error. These options allow multiple definitions
    --
           -z
           --imagic

... and thus should be avoided.

`zig cc`, when used as the C compiler (`CC="zig cc" go build ...`), will
bark, because `zig cc` accepts only `-z PARAM`, as documented.

Closes ziglang/zig#11669

Change-Id: I758054ecaa3ce01a72600bf65d7f7b5c3ec46d09
GitHub-Last-Rev: e068e007da9f2b0441ee0aa8b198a7ba3cd93ed3
GitHub-Pull-Request: golang/go#53030
Reviewed-on: https://go-review.googlesource.com/c/go/+/407834
TryBot-Result: Gopher Robot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Alan Donovan <7069e9552f9d110b0a0f326b96f22f63fb99dfc1@google.com>
Reviewed-by: Cherry Mui <d62e63aa42ce272d7b6a5055d97e942b33a34679@google.com>
Run-TryBot: Cherry Mui <d62e63aa42ce272d7b6a5055d97e942b33a34679@google.com>

golang/go,golang/go,nawawi/go,nawawi/go,golang/go,golang/go,golang/go,golang/go,nawawi/go,nawawi/go,nawawi/go,golang/go,nawawi/go,nawawi/go,golang/go,nawawi/go