aboutsummaryrefslogtreecommitdiff
path: root/bfd/mach-o.c
diff options
context:
space:
mode:
authorTristan Gingold <tristan.gingold@adacore.com>2014-04-03 12:50:31 +0200
committerTristan Gingold <tristan.gingold@adacore.com>2014-04-04 14:40:34 +0200
commit26954155a64f1a6a24b96213a8ee2f5390e649c6 (patch)
tree59b594503f12f24254825943dd5c19731c3d2e10 /bfd/mach-o.c
parentca148c5ad5baae432b763cc40d01333303ceb9db (diff)
downloadgdb-26954155a64f1a6a24b96213a8ee2f5390e649c6.zip
gdb-26954155a64f1a6a24b96213a8ee2f5390e649c6.tar.gz
gdb-26954155a64f1a6a24b96213a8ee2f5390e649c6.tar.bz2
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.
Diffstat (limited to 'bfd/mach-o.c')
-rw-r--r--bfd/mach-o.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/bfd/mach-o.c b/bfd/mach-o.c
index 5203c0f..50173b9 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)
{