This is the mail archive of the
mailing list for the GDB project.
Re: Test for 32/64 bit object file?
- To: ac131313 at cygnus dot com
- Subject: Re: Test for 32/64 bit object file?
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 16 Nov 1999 16:07:00 -0500
- CC: binutils at sourceware dot cygnus dot com, guo at cup dot hp dot com, gdb-patches at sourceware dot cygnus dot com
- References: <3831BC80.31216A6A@cygnus.com>
Date: Wed, 17 Nov 1999 07:20:16 +1100
From: Andrew Cagney <firstname.lastname@example.org>
Is there a way of determining if an object file is 32 or 64 bit? (eg
elf32/elf64, aout32 vs aout64).
Why do you want to know? I don't mean to be snide; it's just that
that distinction usually isn't interesting.
Perhaphs bfd_arch_bits_per_address(ABFD) is correct?
That will tell you whether the CPU uses 32 bits in an address or 64
bits in an address. It's not the same as elf32 vs. elf64, but it may
be what you need to know.