mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-03 21:34:46 +08:00
PR28098 Skip R_*_NONE relocation entries with zero r_sym without counting
PR gold/28098 * reloc.cc (Track_relocs::advance): Skip R_*_NONE relocation entries with r_sym of zero without counting in advance method.
This commit is contained in:

committed by
Alan Modra

parent
85460c161d
commit
7c6ff8af98
@ -1,3 +1,9 @@
|
||||
2021-07-17 Michael Krasnyk <michael.krasnyk@gmail.com>
|
||||
|
||||
PR gold/28098
|
||||
* reloc.cc (Track_relocs::advance): Skip R_*_NONE relocation entries
|
||||
with r_sym of zero without counting in advance method.
|
||||
|
||||
2021-07-03 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/gold.pot: Regenerate.
|
||||
|
@ -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;
|
||||
|
@ -1171,7 +1171,7 @@ class Track_relocs
|
||||
next_addend() const;
|
||||
|
||||
// Advance to OFFSET within the data section, and return the number
|
||||
// of relocs which would be skipped.
|
||||
// of relocs which would be skipped, excluding r_info==0 relocs.
|
||||
int
|
||||
advance(off_t offset);
|
||||
|
||||
|
Reference in New Issue
Block a user