public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Readelf section header printing alignment
@ 2023-12-26 23:01 Pete Dietl
  2023-12-26 23:59 ` Mike Frysinger
  2024-01-05 15:12 ` Nick Clifton
  0 siblings, 2 replies; 4+ messages in thread
From: Pete Dietl @ 2023-12-26 23:01 UTC (permalink / raw)
  To: binutils

The section headers output from readelf with the '-W' option become ugly and
unaligned when a section name is too long.
Example:

Section Headers:
  [Nr] Name              Type            Address          Off    Size
 ES Flg Lk Inf Al
  [ 0]                   NULL            0000000000000000 000000
000000 00      0   0  0
  [ 1] .text             PROGBITS        0000000000000000 000040
00000f 00  AX  0   0  1
  [ 2] .data             PROGBITS        0000000000000000 00004f
000000 00  WA  0   0  1
  [ 3] .bss              NOBITS          0000000000000000 00004f
000000 00  WA  0   0  1
  [ 4] .comment          PROGBITS        0000000000000000 00004f
00002c 01  MS  0   0  1
  [ 5] .note.GNU-stack   PROGBITS        0000000000000000 00007b
000000 00      0   0  1
  [ 6] .note.gnu.property NOTE            0000000000000000 000080
000020 00   A  0   0  8
  [ 7] .eh_frame         PROGBITS        0000000000000000 0000a0
000038 00   A  0   0  8
  [ 8] .rela.eh_frame    RELA            0000000000000000 000148
000018 18   I  9   7  8
  [ 9] .symtab           SYMTAB          0000000000000000 0000d8
000060 18     10   3  8
  [10] .strtab           STRTAB          0000000000000000 000138
00000d 00      0   0  1
  [11] .shstrtab         STRTAB          0000000000000000 000160
000067 00      0   0  1

May I submit a patch to compute the amount of space between 'Name' and 'Type'
from the longest of the section header names, or is this just a silly
formatting detail that no one cares about? :)

Thanks,
Pete

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-01-06  6:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-26 23:01 Readelf section header printing alignment Pete Dietl
2023-12-26 23:59 ` Mike Frysinger
2024-01-05 15:12 ` Nick Clifton
2024-01-06  6:55   ` Fangrui Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).