This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Byte-swapping S-record output in objcopy?
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: binutils <binutils at sources dot redhat dot com>
- Date: Thu, 22 Jan 2004 00:35:48 -0800
- Subject: Byte-swapping S-record output in objcopy?
One of CodeSourcery's customers has asked us for ideas about how to
handle a fairly peculiar situation, to wit: There are ARM embedded
systems where the initial boot (from ROM) is in big-endian mode, but
after everything comes up the operating system runs in little-endian
mode. To handle this properly, the ROM image needs to be generated
little-endian and then byte-swapped before the ROM is burnt.
The image is compiled to ELF, the ROM burner takes S-records, so one
obvious approach is to add a byte-swapping mode to objcopy -O srec. I
was wondering, first, whether there is already a way to do something
like that, and second, if there isn't, whether a patch to add such a
feature would be accepted.
zw