Byte-swapping S-record output in objcopy?
Zack Weinberg
zack@codesourcery.com
Thu Jan 22 08:35:00 GMT 2004
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
More information about the Binutils
mailing list