This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] readelf: use hex prefix for program header alignment
- From: Étienne Buira <etienne dot buira at gmail dot com>
- To: binutils at sourceware dot org
- Date: Wed, 7 Dec 2016 18:30:29 +0100
- Subject: [PATCH] readelf: use hex prefix for program header alignment
- Authentication-results: sourceware.org; auth=none
---
binutils/readelf.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/binutils/readelf.c b/binutils/readelf.c
index c5a628f..a4621ea 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -4841,7 +4841,7 @@ process_program_headers (FILE * file)
(segment->p_flags & PF_R ? 'R' : ' '),
(segment->p_flags & PF_W ? 'W' : ' '),
(segment->p_flags & PF_X ? 'E' : ' '));
- printf ("%#lx", (unsigned long) segment->p_align);
+ printf ("0x%#lx", (unsigned long) segment->p_align);
}
else if (do_wide)
{
@@ -4879,7 +4879,7 @@ process_program_headers (FILE * file)
(segment->p_flags & PF_X ? 'E' : ' '));
if ((unsigned long) segment->p_align == segment->p_align)
- printf ("%#lx", (unsigned long) segment->p_align);
+ printf ("0x%#lx", (unsigned long) segment->p_align);
else
{
print_vma (segment->p_align, PREFIX_HEX);
@@ -4900,7 +4900,7 @@ process_program_headers (FILE * file)
(segment->p_flags & PF_R ? 'R' : ' '),
(segment->p_flags & PF_W ? 'W' : ' '),
(segment->p_flags & PF_X ? 'E' : ' '));
- print_vma (segment->p_align, HEX);
+ print_vma (segment->p_align, PREFIX_HEX);
}
putc ('\n', stdout);