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] readelf: use hex prefix for program header alignment


On 07 Dec 2016 18:30, Étienne Buira wrote:
> --- 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);

this is broken -- the # adds a 0x prefix already (when the value
isn't 0).  so now you'll get 0x0x1234.
-mike

Attachment: signature.asc
Description: Digital signature


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