Commit 8c96e6d7 authored by Joel Sing's avatar Joel Sing

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