[patch] Add printing of .gdb_index section to readelf

Mark Wielaard mjw at redhat.com
Thu Apr 21 17:56:54 UTC 2011


On Thu, 2011-04-21 at 10:17 -0700, Roland McGrath wrote:
> > I guess I could just use binutils readelf then. Pity, since I like the
> > eu-readelf output better to be honest.
> 
> You can just write your tool using libelf and with the output format you
> like.  It's just not part of eu-readelf.

It don't think it is very convenient to have different tools for this.
Why not make it part of eu-readelf, especially when binutils readelf
also supports it. The easiest way to do your suggestion would actually
be to just copy readelf.c, rename it digelf.c and add the parsing of
sections not supported by plain eu-readelf. The reason it is nice to
have parsing/printing of actually used elf sections as part of the same
tool is that you can then reuse all the normal output conventions, like
in this case the address ranges, with or without symbol resolution
depending on -N, etc. Next on my list would be the sdt elf notes
section, which also IMHO should just be part of the same tool with which
you inspect elf files.

Thanks,

Mark



More information about the elfutils-devel mailing list