From: Tristan Gingold Date: Thu, 3 Apr 2014 10:50:31 +0000 (+0200) Subject: mach-o: reject 64 bit targets when not configured for. X-Git-Tag: gdb-7.8-release~653 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26954155a64f1a6a24b96213a8ee2f5390e649c6;p=thirdparty%2Fbinutils-gdb.git mach-o: reject 64 bit targets when not configured for. bfd/ * mach-o.c (bfd_mach_o_header_p): Reject 64 bit target when not configured for. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d07053a9fde..f5216eb0954 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2014-04-04 Tristan Gingold + + * mach-o.c (bfd_mach_o_header_p): Reject 64 bit target when not + configured for. + 2014-04-04 Tristan Gingold * mach-o.c (bfd_mach_o_convert_section_name_to_mach_o): Fix diff --git a/bfd/mach-o.c b/bfd/mach-o.c index 5203c0f520f..50173b9e86f 100644 --- a/bfd/mach-o.c +++ b/bfd/mach-o.c @@ -4300,6 +4300,15 @@ bfd_mach_o_header_p (bfd *abfd, if (header.cputype != cputype) goto wrong; } + else + { +#ifndef BFD64 + /* Do not recognize 64 architectures if not configured for 64bit targets. + This could happen only for generic targets. */ + if (mach_o_wide_p (&header)) + goto wrong; +#endif + } if (filetype) {