]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
mach-o: reject 64 bit targets when not configured for.
authorTristan Gingold <tristan.gingold@adacore.com>
Thu, 3 Apr 2014 10:50:31 +0000 (12:50 +0200)
committerTristan Gingold <tristan.gingold@adacore.com>
Fri, 4 Apr 2014 12:40:34 +0000 (14:40 +0200)
bfd/
* mach-o.c (bfd_mach_o_header_p): Reject 64 bit target when not
configured for.

bfd/ChangeLog
bfd/mach-o.c

index d07053a9fde4ed52b406e79e3ce803ae4995d621..f5216eb0954a09a0a39e6c60502b89e34c58fc3f 100644 (file)
@@ -1,3 +1,8 @@
+2014-04-04  Tristan Gingold  <gingold@adacore.com>
+
+       * mach-o.c (bfd_mach_o_header_p): Reject 64 bit target when not
+       configured for.
+
 2014-04-04  Tristan Gingold  <gingold@adacore.com>
 
        * mach-o.c (bfd_mach_o_convert_section_name_to_mach_o): Fix
index 5203c0f520fe4e39296e13cc994689914d92c7cb..50173b9e86fd14371ca5b2a5ce85c47aac28c54b 100644 (file)
@@ -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)
     {