elf: Check bfd_target_elf_flavour on input first
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 15 Sep 2020 20:05:04 +0000 (13:05 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 15 Sep 2020 20:07:38 +0000 (13:07 -0700)
commit0403e9ccae403b8b7bf82eef0536c5295a45a415
tree5ac05a1b6e73d0b041f7a42bd72f2afe1db54e99
parent47f0e2ff7f0a4479c511f5d3ed4c8a962cb1f237
elf: Check bfd_target_elf_flavour on input first

Check bfd_target_elf_flavour on input first in ldelf_after_open before
checking elf_tdata.

* ldelf.c (ldelf_after_open): Check bfd_target_elf_flavour first.
ld/ChangeLog
ld/ldelf.c