]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.5] cmd/go: fix loading of buildid on OS X executables
authorRuss Cox <rsc@golang.org>
Wed, 18 Nov 2015 20:38:26 +0000 (15:38 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 23 Nov 2015 01:13:28 +0000 (01:13 +0000)
commit55c62d6e3200baae9a4699cc40ed4b24da6422fd
tree59d29f6529b928158ba175674b166345be55b9c6
parentaca4fa5cf5fac24b9bcb7ffab4b2bb7b9ab1fdc4
[release-branch.go1.5] cmd/go: fix loading of buildid on OS X executables

This is a bit of a belt-and-suspenders fix.
On OS X, we now parse the Mach-O file to find the __text section,
which is arguably the more proper fix. But it's a bit worrisome to
depend on a name like __text not changing, so we also read more
of the initial file (now 32 kB, up from 8 kB) and scan that too.

Fixes #12327.

Change-Id: I3a201a3dc278d24707109bb3961c3bdd8b8a0b7b
Reviewed-on: https://go-review.googlesource.com/17038
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-on: https://go-review.googlesource.com/17127
src/cmd/dist/build.go
src/cmd/go/note.go
src/cmd/go/note_test.go
src/cmd/go/pkg.go