readelf: match GNU readelf formatting

GNU readelf emits a blank line before, and uses single quotes around the
symbol table name, in each "Symbol table 'name' contains ## entries"
header.

Reviewed by:	markj
MFC after:	3 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37746

(cherry picked from commit 766145637d)
This commit is contained in:
Ed Maste 2022-12-13 15:07:46 -05:00
parent 4ad93073a1
commit f61fca7409

View file

@ -3263,8 +3263,7 @@ dump_symtab(struct readelf *re, int i)
return;
if (!get_ent_count(s, &len))
return;
printf("Symbol table (%s)", s->name);
printf(" contains %d entries:\n", len);
printf("\nSymbol table '%s' contains %d entries:\n", s->name, len);
printf("%7s%9s%14s%5s%8s%6s%9s%5s\n", "Num:", "Value", "Size", "Type",
"Bind", "Vis", "Ndx", "Name");