PR25900, RISC-V: null pointer dereference
authorAlan Modra <amodra@gmail.com>
Fri, 1 May 2020 06:02:00 +0000 (15:32 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 1 May 2020 06:02:36 +0000 (15:32 +0930)
commita2714d6cca1f1c7695f8dc84b49a4a51d1db86c8
tree5f20f779745c44575c90b238e06395a601963a96
parent60832332244aae2835851aba83f4b705cf29f8a3
PR25900, RISC-V: null pointer dereference

PR 25900
* elfnn-riscv.c (_bfd_riscv_relax_section): Check root.type before
accessing root.u.def of symbols.  Also check root.u.def.section
is non-NULL.  Reverse tests so as to make the logic positive.
bfd/ChangeLog
bfd/elfnn-riscv.c