From d3b05f8d41df1ab8d213622a3195e7116e06dcca Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 9 Aug 2001 21:10:25 +0000 Subject: [PATCH] 2001-08-09 H.J. Lu * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64. (bfd_elf_fprintf_vma): Likewise. --- bfd/ChangeLog | 5 +++++ bfd/elf.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 547182c5cfa..1d153818e1e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2001-08-09 H.J. Lu + + * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64. + (bfd_elf_fprintf_vma): Likewise. + 2001-08-09 H.J. Lu * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved diff --git a/bfd/elf.c b/bfd/elf.c index 746b210d291..b06417c5e1d 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -6001,6 +6001,7 @@ bfd_elf_sprintf_vma (abfd, buf, value) char *buf; bfd_vma value; { +#ifdef BFD64 Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form */ i_ehdrp = elf_elfheader (abfd); @@ -6018,6 +6019,9 @@ bfd_elf_sprintf_vma (abfd, buf, value) else sprintf (buf, "%08lx", (unsigned long) (value & 0xffffffff)); } +#else + sprintf_vma (buf, value); +#endif } void @@ -6026,6 +6030,7 @@ bfd_elf_fprintf_vma (abfd, stream, value) PTR stream; bfd_vma value; { +#ifdef BFD64 Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form */ i_ehdrp = elf_elfheader (abfd); @@ -6044,4 +6049,7 @@ bfd_elf_fprintf_vma (abfd, stream, value) fprintf ((FILE *) stream, "%08lx", (unsigned long) (value & 0xffffffff)); } +#else + fprintf_vma ((FILE *) stream, value); +#endif } -- 2.30.2