Skip to content

Commit

Permalink
cmd/go: don't print phdrs running "go version" on ELF files
Browse files Browse the repository at this point in the history
I assume this was for debugging purposes.

Updates #31624

Change-Id: Ie158fde0574c9bbbd9d1b684f51af5681974aff7
Reviewed-on: https://go-review.googlesource.com/c/go/+/175449
Run-TryBot: Ian Lance Taylor <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Brad Fitzpatrick <[email protected]>
Reviewed-by: Russ Cox <[email protected]>
  • Loading branch information
ianlancetaylor authored and rsc committed May 7, 2019
1 parent 7feb313 commit 8280455
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/cmd/go/internal/version/exe.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ func (x *elfExe) Close() error {

func (x *elfExe) ReadData(addr, size uint64) ([]byte, error) {
for _, prog := range x.f.Progs {
fmt.Printf("%#x %#x %#x\n", addr, prog.Vaddr, prog.Vaddr+prog.Filesz)
if prog.Vaddr <= addr && addr <= prog.Vaddr+prog.Filesz-1 {
n := prog.Vaddr + prog.Filesz - addr
if n > size {
Expand Down

0 comments on commit 8280455

Please sign in to comment.