Skip to content

Commit

Permalink
go/gccgoimporter: fix tests for Plan9
Browse files Browse the repository at this point in the history
This is a backport of https://go-review.googlesource.com/#/c/11194/.

Change-Id: I2f8a8efec77a29258c85f5a1b11cd9deb81853d0
Reviewed-on: https://go-review.googlesource.com/11210
Reviewed-by: Ian Lance Taylor <iant@golang.org>
  • Loading branch information
griesemer committed Jun 18, 2015
1 parent 605d5bf commit af81789
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions go/gccgoimporter/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ func openExportFile(fpath string) (reader io.ReadSeeker, closer io.Closer, err e
if err != nil {
return
}
// reset to offset 0 - needed on Plan 9 (see issue #11265)
// TODO: remove once issue #11265 has been resolved.
_, err = f.Seek(0, 0)
if err != nil {
return
}

var elfreader io.ReaderAt
switch string(magic[:]) {
Expand Down

0 comments on commit af81789

Please sign in to comment.