]> Cypherpunks repositories - gostls13.git/commit
cmd/nm, cmd/objdump: fix elf symbol types
authorRuss Cox <rsc@golang.org>
Thu, 15 May 2014 00:45:13 +0000 (17:45 -0700)
committerRuss Cox <rsc@golang.org>
Thu, 15 May 2014 00:45:13 +0000 (17:45 -0700)
commit8e22903b46aadd6eda937417cba86b528cba92e2
tree4191024da4129525a65e80f28bd2f1e84cef7ca1
parentbf1d400d1c75985354f52f7969ba15fb228aacb2
cmd/nm, cmd/objdump: fix elf symbol types

Turns out elf.File.Sections is indexed by the actual
section number, not the number minus one.
I don't know why I thought the -1 was necessary.

Fixes objdump test (and therefore build) on ELF systems.

While we're here, fix bounds on gnuDump so that we
don't crash when asked to disassemble outside
the text segment. May fix Windows build or at least
make the failure more interesting.

TBR=iant
CC=golang-codereviews
https://golang.org/cl/92390043
src/cmd/nm/elf.go
src/cmd/objdump/elf.go
src/cmd/objdump/main.go