2008-11-20 Tristan Gingold <gingold@adacore.com>
authorTristan Gingold <gingold@adacore.com>
Thu, 20 Nov 2008 09:28:06 +0000 (09:28 +0000)
committerTristan Gingold <gingold@adacore.com>
Thu, 20 Nov 2008 09:28:06 +0000 (09:28 +0000)
* bfd.c (is32bit): Use architecture information for non-ELF
targets.

bfd/ChangeLog
bfd/bfd.c

index 34be6492017a93e83760b277c65cc0caeb72cdda..f25686151c9a6a11b8e7648d004e73fa614c5dd5 100644 (file)
@@ -1,3 +1,8 @@
+2008-11-20  Tristan Gingold  <gingold@adacore.com>
+
+       * bfd.c (is32bit): Use architecture information for non-ELF
+       targets.
+
 2008-11-20  Alan Modra  <amodra@bigpond.net.au>
 
        * elf32-ppc.c (allocate_dynrelocs): Always use tlsld_got for
index 1900c144e6f0bbf00471894caffe7e2df9fff620..847da522ab0ccbaba1d639c03e1afac89bd26f63 100644 (file)
--- 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
 
This page took 0.026106 seconds and 4 git commands to generate.