summaryrefslogtreecommitdiff
path: root/bfd/bfd.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2008-11-20 09:28:06 +0000
committerTristan Gingold <gingold@adacore.com>2008-11-20 09:28:06 +0000
commit47637c4f066545c2b5b4db3b98b8106d9ecec81e (patch)
tree8d00cf27bef9059e9e559ffce2f24ce631e35945 /bfd/bfd.c
parent676a20717edc396f86029a073c33780bb90ec25e (diff)
downloadgdb-47637c4f066545c2b5b4db3b98b8106d9ecec81e.tar.gz
2008-11-20 Tristan Gingold <gingold@adacore.com>
* bfd.c (is32bit): Use architecture information for non-ELF targets.
Diffstat (limited to 'bfd/bfd.c')
-rw-r--r--bfd/bfd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 1900c144e6f..847da522ab0 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -1475,9 +1475,8 @@ is32bit (bfd *abfd)
return bed->s->elfclass == ELFCLASS32;
}
- /* For non-ELF, make a guess based on the target name. */
- return (strstr (bfd_get_target (abfd), "64") == NULL
- && strcmp (bfd_get_target (abfd), "mmo") != 0);
+ /* For non-ELF targets, use architecture information. */
+ return bfd_arch_bits_per_address (abfd) <= 32;
}
#endif