aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2007-01-05 01:25:06 +0000
committerAlan Modra <amodra@gmail.com>2007-01-05 01:25:06 +0000
commit20414cabefd9bfe3398e58193f59118b295904bf (patch)
tree8338504aab297acf14d1483aa9f50ce366f85e95 /binutils/readelf.c
parent06e4ef679f3b981202639f03289a736c78145de6 (diff)
downloadgdb-20414cabefd9bfe3398e58193f59118b295904bf.zip
gdb-20414cabefd9bfe3398e58193f59118b295904bf.tar.gz
gdb-20414cabefd9bfe3398e58193f59118b295904bf.tar.bz2
* readelf.c (dump_section): Don't print 32-bit values, which
were done incorrectly for little-endian. Instead print bytes.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c33
1 files changed, 7 insertions, 26 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 592d893..2aa6ef0 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -7671,34 +7671,15 @@ dump_section (Elf_Internal_Shdr *section, FILE *file)
printf (" 0x%8.8lx ", (unsigned long) addr);
- switch (elf_header.e_ident[EI_DATA])
+ for (j = 0; j < 16; j++)
{
- default:
- case ELFDATA2LSB:
- for (j = 15; j >= 0; j --)
- {
- if (j < lbytes)
- printf ("%2.2x", data[j]);
- else
- printf (" ");
-
- if (!(j & 0x3))
- printf (" ");
- }
- break;
-
- case ELFDATA2MSB:
- for (j = 0; j < 16; j++)
- {
- if (j < lbytes)
- printf ("%2.2x", data[j]);
- else
- printf (" ");
+ if (j < lbytes)
+ printf ("%2.2x", data[j]);
+ else
+ printf (" ");
- if ((j & 3) == 3)
- printf (" ");
- }
- break;
+ if ((j & 3) == 3)
+ printf (" ");
}
for (j = 0; j < lbytes; j++)