1

I'm using armcc and armlink to compile and link my program. After compiling source codes I tried to link them with armlink command, but I got this error:

Fatal error: ./Release/Source/BookCity/bookcity_Protocol.o has the opposite byte order to the preceding objects.

What does this error means? How can I change byte ordering in armcc?

Here is my linking command:

armlink -bin -o ./cis-0.123.bin ../../Lib/X2API.alf ../../Lib/X2DeviceB.alf ../../Lib/X2Font.alf ../../Lib/X2PPPTCP.alf ./Release/Source/BookCity/bookcity_Protocol.o ./Release/Source/BookCity/bookcity_configuration.o ./Release/Source/BookCity/bookcity_initialization.o ./Release/Source/BookCity/bookcity_transactions.o ./Release/Source/Cash/cash_configuration.o

Shahryar
  • 1,454
  • 2
  • 15
  • 32

1 Answers1

0

Take a look at your data initialization. From "Writing a Bi-Endian Compiler" :

Data Initialization

In the BEC, pointer data types can also be attributed with a byte order. As a result, there may be situations where a pointer has the opposite byte order as the target platform. Pointers of the opposite byte order must be byte-swapped upon initialization. This presents a challenge when pointers are initialized by link time constants because these constants are unknown at compile time and are resolved later during the linking stage.

Source : http://www.drdobbs.com/architecture-and-design/writing-a-bi-endian-compiler/240003090

If it didn't solve your problem, think about submitting a bug issue to the compiler team dev. It's may be an internal bug.

lucasg
  • 10,734
  • 4
  • 35
  • 57