aboutsummaryrefslogtreecommitdiff
path: root/gold/powerpc.cc
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-12-08 16:08:29 +1030
committerAlan Modra <amodra@gmail.com>2016-12-08 22:18:47 +1030
commit980d0cdd2fc40c30f3ddef644659d7d0dc00ed40 (patch)
treec20068802784eb03b3c8a1af8c55d26ef1fb5e44 /gold/powerpc.cc
parent69a2af1016e03239f7af4e55268bd27fc500f800 (diff)
downloadgdb-980d0cdd2fc40c30f3ddef644659d7d0dc00ed40.zip
gdb-980d0cdd2fc40c30f3ddef644659d7d0dc00ed40.tar.gz
gdb-980d0cdd2fc40c30f3ddef644659d7d0dc00ed40.tar.bz2
[GOLD] Don't assert in powerpc stub_table
A branch in a non-exec section that needs a stub can lead to this assertion. * powerpc.cc (Powerpc_relobj::stub_table): Return NULL rather then asserting.
Diffstat (limited to 'gold/powerpc.cc')
-rw-r--r--gold/powerpc.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 068f5ca..87cb8bc 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -292,8 +292,8 @@ public:
= static_cast<Target_powerpc<size, big_endian>*>(
parameters->sized_target<size, big_endian>());
unsigned int indx = this->stub_table_index_[shndx];
- gold_assert(indx < target->stub_tables().size());
- return target->stub_tables()[indx];
+ if (indx < target->stub_tables().size())
+ return target->stub_tables()[indx];
}
return NULL;
}