This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: What does--enable-64-bit-bfd mean anyway? Thinko in bfd-in.h?
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Dave Korn <dave dot korn dot cygwin at googlemail dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Mon, 18 May 2009 16:29:40 +0100
- Subject: Re: What does--enable-64-bit-bfd mean anyway? Thinko in bfd-in.h?
- References: <4A116DD5.3060208@gmail.com> <20090518144027.GB21981@bubble.grove.modra.org>
Alan Modra wrote:
> On Mon, May 18, 2009 at 03:16:53PM +0100, Dave Korn wrote:
>> This looks like a thinko to me. Surely the size of a VMA and thus the size
>> used to print it out in the dump fields should depend on the object file
>> format in question, or perhaps the target, but certainly not on host
>> characteristics?
>
> No. A bfd_vma must be at least 64 bits if any target is 64-bit (the
> main one or others selected by --enable-targets), or if
> --enable-64-bit-bfd. A bfd_vma may also be 64 bits if the host is
> 64-bit (when unsigned long is 64-bit).
>
> Printing a bfd_vma is a separate question.
Ah, it's just wrong for the print routine to assume that bfd_vma is
precisely the targets' size, as these macros implicitly do, gotcha.
> See bfd.c:bfd_fprintf_vma.
Ah, so the PE dump routines are wrong to use the macros and should be going
via the bfd_ forms which wrap them. Hmm, it would be nice if the macros were
private to bfd.c in some way, but there you go.
I'll fix peXXigen.c shortly. Should be as simple as putting the 'bfd_' in
front of every [sp]rintf_vma.
cheers,
DaveK