diff --git a/src/cmd/link/internal/ld/data.go b/src/cmd/link/internal/ld/data.go index 925e554b1d9..05c6da3e3bb 100644 --- a/src/cmd/link/internal/ld/data.go +++ b/src/cmd/link/internal/ld/data.go @@ -2246,14 +2246,6 @@ func (ctxt *Link) textbuildid() { } func (ctxt *Link) buildinfo() { - if ctxt.linkShared || ctxt.BuildMode == BuildModePlugin { - // -linkshared and -buildmode=plugin get confused - // about the relocations in go.buildinfo - // pointing at the other data sections. - // The version information is only available in executables. - return - } - // Write the buildinfo symbol, which go version looks for. // The code reading this data is in package debug/buildinfo. ldr := ctxt.loader diff --git a/src/cmd/link/internal/ld/xcoff.go b/src/cmd/link/internal/ld/xcoff.go index 1265c458fef..7b8a134221c 100644 --- a/src/cmd/link/internal/ld/xcoff.go +++ b/src/cmd/link/internal/ld/xcoff.go @@ -1093,11 +1093,6 @@ func (f *xcoffFile) asmaixsym(ctxt *Link) { } shouldBeInSymbolTable := func(s loader.Sym, name string) bool { - if name == ".go.buildinfo" { - // On AIX, .go.buildinfo must be in the symbol table as - // it has relocations. - return true - } if ldr.AttrNotInSymbolTable(s) { return false }