This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: What does--enable-64-bit-bfd mean anyway? Thinko in bfd-in.h?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]