This is the mail archive of the binutils@sourceware.cygnus.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]

Re: readelf breakage.


   Date: Thu, 08 Jul 1999 09:33:41 -0600
   From: Donn Terry <donn@interix.com>

   For Interix, I normally do a bootstrap that starts from using the
   native MS compiler and bootingstrapping from there.  In the process,
   I end up building binutils with the MS compiler.  (This, obviously,
   is a COFF/PE environment.)

   The MS compiler doesn't have a long long (by that name) type,
   and although it's possible to tapdance around the various conditionals,
   it's messy (and useless in my case).

According to bfd/configure.host, the MS compiler supports the type
__int64.  Is this true?

What procedure do you use to configure the tools when using the native
MS compiler?  Is there any way to make that procedure define
HOST_64BIT_TYPE and HOST_U_64BIT_TYPE correctly in bfd.h?

   The readelf command is also useless in this environment, but as
   long as it builds, it's not worth the brain cycles to try to save
   the machine cycles.

   However, with the patch:
   1999-06-04  Nick Clifton  <nickc@cygnus.com>

	   * readelf.c: Add support for 64bit ELF files.

   readelf.c no longer builds because the 64-bit stuff doesn't
   work on the MS compiler.  (I just got around to updating to the
   latest stuff.)

   Removing the #define BFD64 cures the problem so it will build.
   I don't care if it executes.

In any case, I don't think Nick's patch is correct.  It presumes that
there is always a 64 bit type, which is not true in all cases.

Nick, I think we need to make that patch conditional somehow.  For
example, for most people, it would suffice to make it conditional on
``__GNUC__ >= 2''; that would mean that readelf would support 64 bit
ELF hosts when using gcc or when configured for a 64 bit target.
However, we might need more conditionals in readelf.c itself.

You should be able to test the patch by using a native compiler on a
host for which configure.host does not record a 64 bit type, such as
SunOS or Irix 5 or HP/UX.

Ian

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