This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] readelf section names
- To: binutils at sources dot redhat dot com
- Subject: [PATCH] readelf section names
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Thu, 11 Oct 2001 16:14:07 +0200
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
Hi!
I find SHT_LOPROC+123456 section names inconsistent with other printed
section names which are typically stringified section type without the SHT_
prefix. Do you agree? It makes the output more readable too because there is
more space after section name.
2001-10-11 Jakub Jelinek <jakub@redhat.com>
* readelf.c (get_section_type_name): Don't print SHT_ prefix for
LOPROC, LOOS and LOUSER.
--- binutils/readelf.c.jj Fri Oct 5 13:03:01 2001
+++ binutils/readelf.c Mon Oct 8 18:53:35 2001
@@ -1999,12 +1999,12 @@ get_section_type_name (sh_type)
if (result != NULL)
return result;
- sprintf (buff, "SHT_LOPROC+%x", sh_type - SHT_LOPROC);
+ sprintf (buff, "LOPROC+%x", sh_type - SHT_LOPROC);
}
else if ((sh_type >= SHT_LOOS) && (sh_type <= SHT_HIOS))
- sprintf (buff, "SHT_LOOS+%x", sh_type - SHT_LOOS);
+ sprintf (buff, "LOOS+%x", sh_type - SHT_LOOS);
else if ((sh_type >= SHT_LOUSER) && (sh_type <= SHT_HIUSER))
- sprintf (buff, "SHT_LOUSER+%x", sh_type - SHT_LOUSER);
+ sprintf (buff, "LOUSER+%x", sh_type - SHT_LOUSER);
else
sprintf (buff, _("<unknown>: %x"), sh_type);
Jakub