Skip to content

cmd/link: package doc contains outdated linker flags #64476

@dagood

Description

@dagood

Go version

go version devel go1.22-bb8a96fa54 Fri Nov 17 21:25:34 2023 +0000 windows/amd64

What operating system and processor architecture are you using (go env)?

set GOARCH=amd64
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
...

What did you do?

I ran go doc cmd/link and go tool link to see what flags are available.

What did you expect to see?

The list of valid flags should be the same in both results. The descriptions might be a little different (e.g. the doc might have more detailed info).

What did you see instead?

The lists of flags are different.

Example: -u is in go doc cmd/link:

    -u
        Reject unsafe packages.

However, this flag was removed a few years ago in https://go-review.googlesource.com/c/go/+/236117 and doesn't show up in go tool link --help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.SuggestedIssues that may be good for new contributors looking for work to do.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions