+2020-11-03 Alan Modra <amodra@gmail.com>
+
+ * powerpc.cc (Target_powerpc::tocsave_loc): Return a pointer.
+ (Target_powerpc::Relocate::relocate): Avoid -Wdangling-gsl error.
+
2020-11-03 Nick Gasson <nick.gasson@arm.com>
PR 26827
}
// Accessor
- const Tocsave_loc
+ const Tocsave_loc*
tocsave_loc() const
{
- return this->tocsave_loc_;
+ return &this->tocsave_loc_;
}
void
loc.object = relinfo->object;
loc.shndx = relinfo->data_shndx;
loc.offset = rela.get_r_offset();
- Tocsave_loc::const_iterator p = target->tocsave_loc().find(loc);
- if (p != target->tocsave_loc().end())
+ const Tocsave_loc *tocsave = target->tocsave_loc();
+ if (tocsave->find(loc) != tocsave->end())
{
// If we've generated plt calls using this tocsave, then
// the nop needs to be changed to save r2.