diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2007-07-05 02:50:02 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2007-07-05 02:50:02 +0000 |
commit | a93221e521a8b1c5607bb5f10b737cbd33f4bca7 (patch) | |
tree | 7710014efe8d6b3a204118cac71ecbf01495028c /bfd/peicode.h | |
parent | e4e4a5d1f411ee1b61c975a08661ab24de975f02 (diff) | |
download | gdb-a93221e521a8b1c5607bb5f10b737cbd33f4bca7.zip gdb-a93221e521a8b1c5607bb5f10b737cbd33f4bca7.tar.gz gdb-a93221e521a8b1c5607bb5f10b737cbd33f4bca7.tar.bz2 |
2007-07-04 H.J. Lu <hongjiu.lu@intel.com>
* peicode.h (pe_bfd_object_p): Don't check PE vs. EFI target
if arch is unknown.
Diffstat (limited to 'bfd/peicode.h')
-rw-r--r-- | bfd/peicode.h | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/bfd/peicode.h b/bfd/peicode.h index a6140d7..a64ac1d 100644 --- a/bfd/peicode.h +++ b/bfd/peicode.h @@ -1342,6 +1342,10 @@ pe_bfd_object_p (bfd * abfd) else arch = pe_arch (bfd_target_pei_arch (abfd->xvec)); + /* Don't check PE vs. EFI if arch is unknown. */ + if (arch == arch_type_unknown) + return target; + for (target_ptr = bfd_target_vector; *target_ptr != NULL; target_ptr++) { @@ -1355,13 +1359,13 @@ pe_bfd_object_p (bfd * abfd) if (pe_arch (bfd_target_efi_arch (*target_ptr)) != arch) continue; - if (efi) - { - /* TARGET_PTR is an EFI backend. Don't match - TARGET with a EFI file. */ - bfd_set_error (bfd_error_wrong_format); - return NULL; - } + if (efi) + { + /* TARGET_PTR is an EFI backend. Don't match + TARGET with a EFI file. */ + bfd_set_error (bfd_error_wrong_format); + return NULL; + } } else if (bfd_target_pei_p (*target_ptr)) { @@ -1369,13 +1373,13 @@ pe_bfd_object_p (bfd * abfd) if (pe_arch (bfd_target_pei_arch (*target_ptr)) != arch) continue; - if (!efi) - { - /* TARGET_PTR is a PE backend. Don't match - TARGET with a PE file. */ - bfd_set_error (bfd_error_wrong_format); - return NULL; - } + if (!efi) + { + /* TARGET_PTR is a PE backend. Don't match + TARGET with a PE file. */ + bfd_set_error (bfd_error_wrong_format); + return NULL; + } } } } |