aboutsummaryrefslogtreecommitdiff
path: root/gold/powerpc.cc
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-11-03 20:51:13 +1030
committerAlan Modra <amodra@gmail.com>2020-11-04 00:48:51 +1030
commitb0d0d02bde06c61969160c0c5a3d7f48daa8b24a (patch)
tree72303c490983c889132a693082ed663d577d2de7 /gold/powerpc.cc
parent3a959875ea0a017ef378fa084c6cbddee01db9d8 (diff)
downloadbinutils-b0d0d02bde06c61969160c0c5a3d7f48daa8b24a.zip
binutils-b0d0d02bde06c61969160c0c5a3d7f48daa8b24a.tar.gz
binutils-b0d0d02bde06c61969160c0c5a3d7f48daa8b24a.tar.bz2
PowerPC problem building gold with clang
* powerpc.cc (Target_powerpc::tocsave_loc): Return a pointer. (Target_powerpc::Relocate::relocate): Avoid -Wdangling-gsl error.
Diffstat (limited to 'gold/powerpc.cc')
-rw-r--r--gold/powerpc.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 476fb4e..b0d6a74 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -757,10 +757,10 @@ class Target_powerpc : public Sized_target<size, big_endian>
}
// Accessor
- const Tocsave_loc
+ const Tocsave_loc*
tocsave_loc() const
{
- return this->tocsave_loc_;
+ return &this->tocsave_loc_;
}
void
@@ -11946,8 +11946,8 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
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.