This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

Re: [PATCH v2] readelf: use hex prefix for program header alignment


On Thu, Dec 08, 2016 at 12:09:21PM -0500, Hans-Peter Nilsson wrote:
> On Thu, 8 Dec 2016, Étienne Buira wrote:
> > ---
> >  binutils/readelf.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/binutils/readelf.c b/binutils/readelf.c
> > index c5a628f..69d8889 100644
> > --- a/binutils/readelf.c
> > +++ b/binutils/readelf.c
> > @@ -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);
> >

Hi

> Missing updates to the test-suite.  I'm guessing that's going to
> be a big patch.

binutils/$ make check passes both with and without the patch.

About the whole testsuite, it is unrunable (many test failures, i
suspect many of them to be test errors actually), so i don't know if i
broken them more than they are.
Fixing binutils' testsuite is not in my current plans.

> Also missing a changelog

Yes, sorry, but Nick Clifton gently added an entry there (thanks him
BTW).

> and it'd be nice with
> some background why you want to change this now.

Program headers output was already globally consistent with '0x'
prefixes, so i thought it was a fix to add one where hexadecimal were
printed.
Moreover, it turned out that the '0x' prefix was missing only when
readelfing a 64 bits ELF in 80 columns mode (it was present for 32 bits
as for wide mode), so it definitely looks like a fix.

However, i will certainly not enter a fight for this patch, so if there
are real concerns, feel free to revert.

Regards


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