]> Cypherpunks repositories - gostls13.git/commitdiff
debug/elf: fix offset for GNU version symbols
authorJoel Sing <jsing@google.com>
Wed, 14 Nov 2012 16:36:19 +0000 (03:36 +1100)
committerJoel Sing <jsing@google.com>
Wed, 14 Nov 2012 16:36:19 +0000 (03:36 +1100)
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

src/pkg/debug/elf/file.go

index 25b04d79593533a91642a3604df16f5cb2f173c0..b030b043dfc1204828f1d04dc1ae35ca1a58ece6 100644 (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
        }