1
0
mirror of https://github.com/golang/go synced 2024-11-19 17:04:41 -07:00

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
This commit is contained in:
Joel Sing 2012-11-15 03:36:19 +11:00
parent 76689845e3
commit 8c96e6d740

View File

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