This is the mail archive of the
mailing list for the binutils project.
Re: objdump always displays LSbytes first irrespective of endianessof target
- From: Shekhar Divekar <shekhar at cradle dot com>
- To: Ian Lance Taylor <ian at wasabisystems dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 14 Jan 2004 19:45:46 +0530
- Subject: Re: objdump always displays LSbytes first irrespective of endianessof target
- Organization: Cradle Technologies
- References: <1074076062.5431.34.camel@shekhar> <firstname.lastname@example.org>
- Reply-to: shekhar at cradle dot com
Thanks for the reply.
Our port uses 'print_insn_normal' which does not touch
info->bytes_per_chunk. I will study the mips/other ports
for inputs and ask if I need any other information.
Ian Lance Taylor wrote:
Shekhar Divekar <email@example.com> writes:
I am working on a port of binutils with LITTLE ENDIAN target.
In the dump I would like to see MSByte first as it is natural for
little endian m/c. But objdump always displays LSbytes first
irrespective of endianess of target. On further investigation I found
out that this is because in objdump.c:disassemble_bytes 'bpc' is always
initialized to 1, which results in check for 'display_endian' while
producing the dump, useless.
What sources are you using? In the current sources, bpc is controlled
by info->bytes_per_chunk, and the disassembler is expected to set that
For example, a typical RISC target for which all instructions are 4
bytes would set info->bytes_per_chunk to 4 in the disassembler. See,