From: Alan Modra Date: Thu, 8 Dec 2016 05:38:29 +0000 (+1030) Subject: [GOLD] Don't assert in powerpc stub_table X-Git-Tag: users/ARM/embedded-binutils-2_28-branch-2017q1~250 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=980d0cdd2fc40c30f3ddef644659d7d0dc00ed40;p=platform%2Fupstream%2Fbinutils.git [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. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 8b99909..38fd9ea 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,5 +1,10 @@ 2016-12-08 Alan Modra + * powerpc.cc (Powerpc_relobj::stub_table): Return NULL rather + then asserting. + +2016-12-08 Alan Modra + * options.h (--stub-group-multi): Fix typo. 2016-12-07 Alan Modra 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*>( parameters->sized_target()); 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; }