PATCH: readelf: Print sh_flags in hex

H. J. Lu
Tue Aug 9 19:46:00 GMT 2005

On Tue, Aug 09, 2005 at 05:11:26PM +0100, Nick Clifton wrote:
> Hi H. J.
> >Since the current readelf doesn't provide complete information on
> >sh_flags, should I just change the default one to
> >
> >    [Nr] Name    Type            Addr     Off    Size   ES Lk Inf Al
> >         Flags
> >    [ 0] .text   PROGBITS        00001010 001010 000011 00  0   0  4
> > 	[0x10000006]: ALLOC, EXEC, PROC (0x1000000)
> No - people may have scripts that parse the current output and these 
> will not expect the new lines.  I prefer your idea of having a new 
> switch to enable a more complete list of the section's flags.
> In fact it occurs to me that there is possibly a need for this new 
> switch to enable a more generally verbose section header description, 
> covering things like the sh_info field, the sh_link field and so on. 
> More description names for the columns being displayed would also help.

The interpretation of sh_info and sh_link depend on other attributes of
a section. The current numerical value should be good enough for them.

> The new switch might also be combined with the --full-section-name 
> and/or the --wide switches in order to reduce the number of switches 
> affecting the section header output, thus making readelf simpler to use.
> What do you think of these ideas ?

I like the idea of using --full-section-name. --wide output line may be
too long.


More information about the Binutils mailing list