]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - bfd/elf64-ppc.c
Fix ppc64 ELFv1 assertion failure
authorAlan Modra <amodra@gmail.com>
Wed, 22 Jul 2015 09:41:22 +0000 (19:11 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 22 Jul 2015 09:50:38 +0000 (19:20 +0930)
commitbb854a36d192bfa6609da9e3b1342e33da445598
treedeb7c5c49f22f995a2dff19250c87ed5e5215a4b
parentf945ba50bb7e11c03d850d1680b15da758300ad7
Fix ppc64 ELFv1 assertion failure

Bogus assembly can hit an assertion in opd_entry_value when the symbol
referenced by a function descriptor is undefined.  Worse, the code
after the assert copies unitialised memory to return the code section.
This uninitialised pointer can later be dereferencd, possibly causing
a linker segmentation fault.

* elf64-ppc.c (opd_entry_value): Remove assertion.  Instead,
return -1 if symbol referenced is not defined.  Tidy.
bfd/ChangeLog
bfd/elf64-ppc.c