Commit 8280455d authored by Ian Lance Taylor's avatar Ian Lance Taylor Committed by Russ Cox

cmd/go: don't print phdrs running "go version" on ELF files

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 <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: default avatarRuss Cox <rsc@golang.org>
parent 7feb3138
...@@ -86,7 +86,6 @@ func (x *elfExe) Close() error { ...@@ -86,7 +86,6 @@ func (x *elfExe) Close() error {
func (x *elfExe) ReadData(addr, size uint64) ([]byte, error) { func (x *elfExe) ReadData(addr, size uint64) ([]byte, error) {
for _, prog := range x.f.Progs { 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 { if prog.Vaddr <= addr && addr <= prog.Vaddr+prog.Filesz-1 {
n := prog.Vaddr + prog.Filesz - addr n := prog.Vaddr + prog.Filesz - addr
if n > size { if n > size {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment