Revert "cmd/link: fix GC data reading from shared library"

This reverts CL 240462.

Reason for revert: test fails on PPC64LE.

Updates #39927.

Change-Id: I4f14fd0c36e604a80ae9f2f86d1e643e28945e93
Reviewed-on: https://go-review.googlesource.com/c/go/+/240616
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
Cherry Zhang 2020-06-30 19:09:38 +00:00 committed by Austin Clements
parent 5779bb4e92
commit 96e8366437
5 changed files with 9 additions and 82 deletions

View file

@ -2124,9 +2124,7 @@ func ldshlibsyms(ctxt *Link, shlib string) {
Errorf(nil, "cannot open shared library: %s", libpath)
return
}
// Keep the file open as decodetypeGcprog needs to read from it.
// TODO: fix. Maybe mmap the file.
//defer f.Close()
defer f.Close()
hash, err := readnote(f, ELF_NOTE_GO_NAME, ELF_NOTE_GOABIHASH_TAG)
if err != nil {