* Fix building readelf on 64bit ELF systems
@ 1999-12-10 10:17 Nick Clifton
0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 1999-12-10 10:17 UTC (permalink / raw)
To: binutils
Hi Guys,
Here is a small patch to fix building readelf on 64bit ELF systems.
I forgot to allow for the fact that native 64bit ELF systems do not
define _bfd_int64_low/_bfd_int64_high.
OK to apply ?
Cheers
Nick
1999-12-10 Nick Clifton <nickc@cygnus.com>
* readelf.c (print_vma): Support native 64bit ELF systems.
Index: readelf.c
===================================================================
RCS file: /cvs/binutils/binutils/binutils/readelf.c,v
retrieving revision 1.33
diff -p -r1.33 readelf.c
*** readelf.c 1999/12/07 21:41:54 1.33
--- readelf.c 1999/12/10 18:15:38
*************** print_vma (vma, mode)
*** 442,468 ****
--- 442,480 ----
break;
case DEC:
+ #if BFD_HOST_64BIT_LONG
+ printf ("%ld", vma);
+ #else
if (_bfd_int64_high (vma))
/* ugg */
printf ("++%ld", _bfd_int64_low (vma));
else
printf ("%ld", _bfd_int64_low (vma));
+ #endif
break;
case DEC_5:
+ #if BFD_HOST_64BIT_LONG
+ printf ("%5ld", vma);
+ #else
if (_bfd_int64_high (vma))
/* ugg */
printf ("++%ld", _bfd_int64_low (vma));
else
printf ("%5ld", _bfd_int64_low (vma));
+ #endif
break;
case UNSIGNED:
+ #if BFD_HOST_64BIT_LONG
+ printf ("%lu", vma);
+ #else
if (_bfd_int64_high (vma))
/* ugg */
printf ("++%lu", _bfd_int64_low (vma));
else
printf ("%lu", _bfd_int64_low (vma));
+ #endif
break;
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-12-10 10:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-10 10:17 Fix building readelf on 64bit ELF systems Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).