From fef95521c7dfbb5dc6dd99c3de46d992915d8c9e Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 20 Nov 2008 09:28:06 +0000 Subject: [PATCH] 2008-11-20 Tristan Gingold * bfd.c (is32bit): Use architecture information for non-ELF targets. --- bfd/ChangeLog | 5 +++++ bfd/bfd.c | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 34be64920..f25686151 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2008-11-20 Tristan Gingold + + * bfd.c (is32bit): Use architecture information for non-ELF + targets. + 2008-11-20 Alan Modra * elf32-ppc.c (allocate_dynrelocs): Always use tlsld_got for diff --git a/bfd/bfd.c b/bfd/bfd.c index 1900c144e..847da522a 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 -- 2.11.4.GIT