[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.
This commit is contained in:
Alan Modra 2016-12-08 16:08:29 +10:30
parent 69a2af1016
commit 980d0cdd2f
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2016-12-08 Alan Modra <amodra@gmail.com>
* powerpc.cc (Powerpc_relobj::stub_table): Return NULL rather
then asserting.
2016-12-08 Alan Modra <amodra@gmail.com>
* options.h (--stub-group-multi): Fix typo.

View File

@ -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;
}