Skip to content

Commit 8c96e6d

Browse files
author
Joel Sing
committed
debug/elf: fix offset for GNU version symbols
Since we no longer skip the first entry when reading a symbol table, we no longer need to allow for the offset difference when processing the GNU version symbols. Unbreaks builds on Linux. R=golang-dev, agl, iant CC=golang-dev https://golang.org/cl/6843057
1 parent 7668984 commit 8c96e6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pkg/debug/elf/file.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -700,8 +700,8 @@ func (f *File) gnuVersionInit(str []byte) {
700700
// gnuVersion adds Library and Version information to sym,
701701
// which came from offset i of the symbol table.
702702
func (f *File) gnuVersion(i int, sym *ImportedSymbol) {
703-
// Each entry is two bytes; skip undef entry at beginning.
704-
i = (i + 1) * 2
703+
// Each entry is two bytes.
704+
i = i * 2
705705
if i >= len(f.gnuVersym) {
706706
return
707707
}

0 commit comments

Comments
 (0)