diff options
Diffstat (limited to 'gold/reloc.cc')
-rw-r--r-- | gold/reloc.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gold/reloc.cc b/gold/reloc.cc index 34a836f..82ec6cb 100644 --- a/gold/reloc.cc +++ b/gold/reloc.cc @@ -1602,7 +1602,10 @@ Track_relocs<size, big_endian>::advance(off_t offset) elfcpp::Rel<size, big_endian> rel(this->prelocs_ + this->pos_); if (static_cast<off_t>(rel.get_r_offset()) >= offset) break; - ++ret; + // Skip R_*_NONE relocation entries with r_sym of zero + // without counting. + if (rel.get_r_info() != 0) + ++ret; this->pos_ += this->reloc_size_; } return ret; |