aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-05-27 12:37:21 +0930
committerAlan Modra <amodra@gmail.com>2022-05-27 22:08:59 +0930
commit0e3c1eebb22e0ade28b619fb41f42d66ed6fb145 (patch)
tree8a886ac9438d7e9268807c07585eef11a146714d /binutils/readelf.c
parentaa9b5dbc0f30855aa23034cbd78a1f2025cb9fa9 (diff)
downloadgdb-0e3c1eebb22e0ade28b619fb41f42d66ed6fb145.zip
gdb-0e3c1eebb22e0ade28b619fb41f42d66ed6fb145.tar.gz
gdb-0e3c1eebb22e0ade28b619fb41f42d66ed6fb145.tar.bz2
Remove use of bfd_uint64_t and similar
Requiring C99 means that uses of bfd_uint64_t can be replaced with uint64_t, and similarly for bfd_int64_t, BFD_HOST_U_64_BIT, and BFD_HOST_64_BIT. This patch does that, removes #ifdef BFD_HOST_* and tidies a few places that print 64-bit values.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index c35bfc1..4c0a2a3 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -10729,7 +10729,7 @@ dynamic_section_parisc_val (Elf_Internal_Dyn * entry)
/* Display a VMS time in a human readable format. */
static void
-print_vms_time (bfd_int64_t vmstime)
+print_vms_time (int64_t vmstime)
{
struct tm *tm = NULL;
time_t unxtime;
@@ -20764,7 +20764,7 @@ print_ia64_vms_note (Elf_Internal_Note * pnote)
/* FIXME: Generate an error if descsz > 8 ? */
printf ("0x%016" BFD_VMA_FMT "x\n",
- (bfd_vma) byte_get ((unsigned char *)pnote->descdata, 8));
+ (bfd_vma) byte_get ((unsigned char *) pnote->descdata, 8));
break;
case NT_VMS_LINKTIME:
@@ -20773,8 +20773,7 @@ print_ia64_vms_note (Elf_Internal_Note * pnote)
goto desc_size_fail;
/* FIXME: Generate an error if descsz > 8 ? */
- print_vms_time
- ((bfd_int64_t) byte_get ((unsigned char *)pnote->descdata, 8));
+ print_vms_time (byte_get ((unsigned char *) pnote->descdata, 8));
printf ("\n");
break;
@@ -20784,8 +20783,7 @@ print_ia64_vms_note (Elf_Internal_Note * pnote)
goto desc_size_fail;
/* FIXME: Generate an error if descsz > 8 ? */
- print_vms_time
- ((bfd_int64_t) byte_get ((unsigned char *)pnote->descdata, 8));
+ print_vms_time (byte_get ((unsigned char *) pnote->descdata, 8));
printf ("\n");
break;
@@ -20794,16 +20792,15 @@ print_ia64_vms_note (Elf_Internal_Note * pnote)
goto desc_size_fail;
printf (_(" Major id: %u, minor id: %u\n"),
- (unsigned) byte_get ((unsigned char *)pnote->descdata, 4),
- (unsigned) byte_get ((unsigned char *)pnote->descdata + 4, 4));
+ (unsigned) byte_get ((unsigned char *) pnote->descdata, 4),
+ (unsigned) byte_get ((unsigned char *) pnote->descdata + 4, 4));
printf (_(" Last modified : "));
- print_vms_time
- ((bfd_int64_t) byte_get ((unsigned char *)pnote->descdata + 8, 8));
+ print_vms_time (byte_get ((unsigned char *) pnote->descdata + 8, 8));
printf (_("\n Link flags : "));
printf ("0x%016" BFD_VMA_FMT "x\n",
- (bfd_vma) byte_get ((unsigned char *)pnote->descdata + 16, 8));
+ (bfd_vma) byte_get ((unsigned char *) pnote->descdata + 16, 8));
printf (_(" Header flags: 0x%08x\n"),
- (unsigned) byte_get ((unsigned char *)pnote->descdata + 24, 4));
+ (unsigned) byte_get ((unsigned char *) pnote->descdata + 24, 4));
printf (_(" Image id : %.*s\n"), maxlen - 32, pnote->descdata + 32);
break;
#endif