aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2021-02-02 14:35:04 +0000
committerEd Maste <emaste@FreeBSD.org>2021-02-03 21:24:22 +0000
commit847dfd2803f6c8b077e3ebc68e35adff2c79a65f (patch)
tree3f0f8f23ff25b1626272c0ef40269cc245d20cec /contrib
parente79b51e2b2e35d6256a1ef5311ce02ec4032d21f (diff)
downloadsrc-847dfd2803f6c8b077e3ebc68e35adff2c79a65f.tar.gz
src-847dfd2803f6c8b077e3ebc68e35adff2c79a65f.zip
readelf: do not trucate section name with -W
PR: 246015 Reviewed by: cem Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28461
Diffstat (limited to 'contrib')
-rw-r--r--contrib/elftoolchain/readelf/readelf.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/contrib/elftoolchain/readelf/readelf.c b/contrib/elftoolchain/readelf/readelf.c
index 479f4a5ba28f..022c9e9066ab 100644
--- a/contrib/elftoolchain/readelf/readelf.c
+++ b/contrib/elftoolchain/readelf/readelf.c
@@ -2632,16 +2632,21 @@ dump_shdr(struct readelf *re)
" %6.6jx %6.6jx %2.2jx %2u %3u %2ju\n"
" %s\n", ST_CT);
else
- printf(" [%2d] %-17.17s %-15.15s %8.8jx"
- " %6.6jx %6.6jx %2.2jx %3s %2u %3u %2ju\n",
- S_CT);
+ if (re->options & RE_WW)
+ printf(" [%2d] %-17s %-15.15s "
+ "%8.8jx %6.6jx %6.6jx %2.2jx %3s "
+ "%2u %3u %2ju\n", S_CT);
+ else
+ printf(" [%2d] %-17.17s %-15.15s "
+ "%8.8jx %6.6jx %6.6jx %2.2jx %3s "
+ "%2u %3u %2ju\n", S_CT);
} else if (re->options & RE_WW) {
if (re->options & RE_T)
printf(" [%2d] %s\n %-15.15s %16.16jx"
" %6.6jx %6.6jx %2.2jx %2u %3u %2ju\n"
" %s\n", ST_CT);
else
- printf(" [%2d] %-17.17s %-15.15s %16.16jx"
+ printf(" [%2d] %-17s %-15.15s %16.16jx"
" %6.6jx %6.6jx %2.2jx %3s %2u %3u %2ju\n",
S_CT);
} else {