From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id D5EBC3858D39 for ; Tue, 26 Dec 2023 23:59:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D5EBC3858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D5EBC3858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703635146; cv=none; b=MTPbSgH7fCxXcyDlO7KKNwX2OGzB5iv4zHqe88aRDxAKK8iM3YeLiscvcBmcH+BxqpSTTfA1gY771PDlLH0OUd43XMpPgXkQ7Kif24VFmJ7Rea7CaS9z07pQayX9wJE7P1yBxWeOeuWW7rNcfIeMdgMeRQKkZnenJsAKRKCFbN4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703635146; c=relaxed/simple; bh=TlgOrDyTK7hOTM21nwblIO8qA4qtCTGTo1xKyKUdb6U=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=okR6rx1jC8xZ7EhZ1eLnyffWeLsHp/lQmNfQij9iZQkC7wMjgjmVZJrU7cTjHyAsCml+QGhGDe038r2eXEGq75NBa+ymnDt1g+bArBk6mvY0KAWS24ipwXTLBuYYQ7g26aveoMcojyaCEne3ohGZSja/LGOkSQtqdh2WnKFj6x0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id C7A22335DCD; Tue, 26 Dec 2023 23:59:03 +0000 (UTC) Date: Tue, 26 Dec 2023 18:59:02 -0500 From: Mike Frysinger To: Pete Dietl Cc: binutils@sourceware.org Subject: Re: Readelf section header printing alignment Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Zakmymxhq6/vXC9C" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --Zakmymxhq6/vXC9C Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 26 Dec 2023 15:01, Pete Dietl wrote: > The section headers output from readelf with the '-W' option become ugly = and > unaligned when a section name is too long. > Example: >=20 > 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 >=20 > May I submit a patch to compute the amount of space between 'Name' and 'T= ype' > from the longest of the section header names, or is this just a silly > formatting detail that no one cares about? :) i think all of the cols can get unaligned if the content is bigger than the allocated space. i wish it would autoalign/fix itself, at least when using the -W option. -mike --Zakmymxhq6/vXC9C Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmWLaMYACgkQQWM7n+g3 9YE0nxAAh0GWNoloNbTgwxMTbAIuMxFI/KbGJdbu0K5NR7Bqx+nOMkQRUAUzjdlC jxMT6BGC+0d9eHsKyOhD/F/dhkVc2S396ace1XGJBpSa4WXM3O4zHRjIFIii7XGD /6IQOVNQdkNMWne3eeXkfikGti7eGFxPXblhiexxLW7vf+tfYWvr2zgOYSdOIFUL tKcoIBzWN1cD4lXH70cGz53wPF2hCxGDDfsEFMfyVbTPr7TCsigjRClhuw/cGqzJ jJM0OEfldORHrs5ffgoXQPjRrtdJOvyHr2YBcpoDzbzMqfAHssRRimjcA3lE6JoO MtkMFs1wsc08Yxr0Xpo8Q2ZUyg1A68Wew7BvK+ljqw10A5GZpv9tr/1mG/wRZKSM 20aDPbhqZYV+MwVd+NwWvI6SPlcW4ckFuuznUO3PKDXJes9cI1yMWlyg7Qnrk6L4 fj8VKTtBMrShWjMLAHn0aIVHf97+UOc4opGd0NT45fMUTAHNCmE6pbjwd/BBP9vq iMimfG3bi/ubBcH7xAX5OKHvRmoHzq9kH9wUHkbfazZoW38xX8EeB2cbeAAcRa6a n5vvXOskvTDu7uAg0r4QysHbx2qvC/c4STcbyGFWEBW1OvDmYZq1TmyL/x386so6 ym8o3FocFZ4K4BZOvnI3/tyRKpsjI1l10Mi1UiNvSsuOzGWe/7s= =k6FY -----END PGP SIGNATURE----- --Zakmymxhq6/vXC9C--