GNU Binutils with patches for OS216
Revision | 4790d4b3cef58c4663f8b63bb1761e8494d323f5 (tree) |
---|---|
Zeit | 2017-02-22 08:10:22 |
Autor | Alan Modra <amodra@gmai...> |
Commiter | Alan Modra |
[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.
@@ -2,6 +2,10 @@ | ||
2 | 2 | |
3 | 3 | Apply from master |
4 | 4 | 2016-12-08 Alan Modra <amodra@gmail.com> |
5 | + * powerpc.cc (Powerpc_relobj::stub_table): Return NULL rather | |
6 | + then asserting. | |
7 | + | |
8 | + 2016-12-08 Alan Modra <amodra@gmail.com> | |
5 | 9 | * options.h (--stub-group-multi): Fix typo. |
6 | 10 | |
7 | 11 | 2016-12-07 Alan Modra <amodra@gmail.com> |
@@ -292,8 +292,8 @@ public: | ||
292 | 292 | = static_cast<Target_powerpc<size, big_endian>*>( |
293 | 293 | parameters->sized_target<size, big_endian>()); |
294 | 294 | unsigned int indx = this->stub_table_index_[shndx]; |
295 | - gold_assert(indx < target->stub_tables().size()); | |
296 | - return target->stub_tables()[indx]; | |
295 | + if (indx < target->stub_tables().size()) | |
296 | + return target->stub_tables()[indx]; | |
297 | 297 | } |
298 | 298 | return NULL; |
299 | 299 | } |