This is the mail archive of the binutils@sources.redhat.com 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: AIX 4.1 broken (was: Re: Branching for 2.12)


On Wed, Jan 30, 2002 at 09:36:19PM -0200, Alexandre Oliva wrote:
> On Jan 30, 2002, Alexandre Oliva <aoliva@redhat.com> wrote:
> 
> > collect2: stage1/libgcc.a: not a COFF file
> 
> > Interestingly, `ar t' from binutils 2.11 shows the archive members
> > just fine, but that from CVS mainline gives:
> 
> > BFD: BFD 2.11.93 20020129 assertion fail /home/lsd/oliva/src/tool/egcs/bfd/libbfd.c:1110
> 
> > before proceeding to list all archive members correctly.
> 
> > I'll try to look further into it tomorrow.
> 
> The reason it fails is that _bfd_xcoff_slurp_armap() calls H_GET_64(),
> but this macro calls bfd_getb64() that BFD_FAIL()s ifndef BFD64.  AIX
> 4.1 is not a 64-bit architecture, so it's reasonable that BFD64 is not
> defined, but where is the error: should _bfd_xcoff_slurp_armap() be
> fixed so as to not call H_GET_64() ifndef BFD64 or should bfd_getb64
> do its job regardless of the macro?

If BFD64 is not defined, then bfd_vma (which is an unsigned long in this
case) may not be large enough to return a 64 bit value from bfd_getb64.
In fact, handling of 64 bit values throughout bfd may be broken.

For that reason, I think _bfd_xcoff_slurp_armap should not try to handle
64 bit archives when BFD64 is undefined.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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