aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog10
-rw-r--r--binutils/readelf.c40
2 files changed, 29 insertions, 21 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index c11da45..96ce7a8 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,13 @@
+2016-02-15 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (get_section_type_name): Add hex prefix to offsets
+ printed for LOPROC and LOOS values. Ensure that a result is
+ always returned for the V850 target, even when an unrecognised
+ processor specific value is encountered.
+ (process_section_headers): Display key values in the order in
+ which they appear to the user. Add the "C (compressed)" value to
+ the list.
+
2016-02-12 H.J. Lu <hongjiu.lu@intel.com>
* doc/binutils.texi: Fix a typo.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index b3a28a8..f33257b 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -3893,6 +3893,7 @@ static const char *
get_section_type_name (unsigned int sh_type)
{
static char buff[32];
+ const char * result;
switch (sh_type)
{
@@ -3926,8 +3927,6 @@ get_section_type_name (unsigned int sh_type)
default:
if ((sh_type >= SHT_LOPROC) && (sh_type <= SHT_HIPROC))
{
- const char * result;
-
switch (elf_header.e_machine)
{
case EM_MIPS:
@@ -3970,12 +3969,10 @@ get_section_type_name (unsigned int sh_type)
if (result != NULL)
return result;
- sprintf (buff, "LOPROC+%x", sh_type - SHT_LOPROC);
+ sprintf (buff, "LOPROC+%#x", sh_type - SHT_LOPROC);
}
else if ((sh_type >= SHT_LOOS) && (sh_type <= SHT_HIOS))
{
- const char * result;
-
switch (elf_header.e_machine)
{
case EM_IA_64:
@@ -3989,7 +3986,7 @@ get_section_type_name (unsigned int sh_type)
if (result != NULL)
return result;
- sprintf (buff, "LOOS+%x", sh_type - SHT_LOOS);
+ sprintf (buff, "LOOS+%#x", sh_type - SHT_LOOS);
}
else if ((sh_type >= SHT_LOUSER) && (sh_type <= SHT_HIUSER))
{
@@ -3998,12 +3995,16 @@ get_section_type_name (unsigned int sh_type)
case EM_V800:
case EM_V850:
case EM_CYGNUS_V850:
- return get_v850_section_type_name (sh_type);
+ result = get_v850_section_type_name (sh_type);
default:
+ result = NULL;
break;
}
- sprintf (buff, "LOUSER+%x", sh_type - SHT_LOUSER);
+ if (result != NULL)
+ return result;
+
+ sprintf (buff, "LOUSER+%#x", sh_type - SHT_LOUSER);
}
else
/* This message is probably going to be displayed in a 15
@@ -6003,23 +6004,20 @@ process_section_headers (FILE * file)
if (!do_section_details)
{
+ /* The ordering of the letters shown here matches the ordering of the
+ corresponding SHF_xxx values, and hence the order in which these
+ letters will be displayed to the user. */
+ printf (_("Key to Flags:\n\
+ W (write), A (alloc), X (execute), M (merge), S (strings), I (info),\n\
+ L (link order), O (extra OS processing required), G (group), T (TLS),\n\
+ C (compressed), x (unknown), o (OS specific), E (exclude),\n"));
if (elf_header.e_machine == EM_X86_64
|| elf_header.e_machine == EM_L1OM
|| elf_header.e_machine == EM_K1OM)
- printf (_("Key to Flags:\n\
- W (write), A (alloc), X (execute), M (merge), S (strings), l (large)\n\
- I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)\n\
- O (extra OS processing required) o (OS specific), p (processor specific)\n"));
+ printf (_("l (large), "));
else if (elf_header.e_machine == EM_ARM)
- printf (_("Key to Flags:\n\
- W (write), A (alloc), X (execute), M (merge), S (strings), y (noread)\n\
- I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)\n\
- O (extra OS processing required) o (OS specific), p (processor specific)\n"));
- else
- printf (_("Key to Flags:\n\
- W (write), A (alloc), X (execute), M (merge), S (strings)\n\
- I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)\n\
- O (extra OS processing required) o (OS specific), p (processor specific)\n"));
+ printf (_("y (noread), "));
+ printf ("p (processor specific)\n");
}
return 1;