-   Oliver Webb <aquahobby...@proton.me>
From 02b0b9a214f64f0685ec42529d3a80ea3bf71d9b Mon Sep 17 00:00:00 2001
From: Oliver Webb <aquahobby...@proton.me>
Date: Thu, 25 Apr 2024 20:43:01 -0500
Subject: [PATCH] readelf: Zero Padd -S section numbers (More scriptable
 through cut/awk)

---
 toys/other/readelf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toys/other/readelf.c b/toys/other/readelf.c
index c1fbba60..da089f38 100644
--- a/toys/other/readelf.c
+++ b/toys/other/readelf.c
@@ -551,7 +551,7 @@ static void scan_elf()
       char sh_flags[12] = {}, *p = sh_flags;
 
       for (j=0; j<12; j++) if (s.flags&(1<<j)) *p++ = "WAXxMSILOGTC"[j];
-      printf("  [%2d] %-17s %-15s %0*llx %06llx %06llx %02llx %3s %2d %2d %2lld\n",
+      printf("  [%02d] %-17s %-15s %0*llx %06llx %06llx %02llx %3s %2d %2d %2lld\n",
              i, s.name, sh_type(s.type), w, s.addr, s.offset, s.size,
              s.entsize, sh_flags, s.link, s.info, s.addralign);
     }
-- 
2.44.0

_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to