Unsupported Extensions

The CodeWarrior Assembler does not support all GNU extensions. The following table lists the unsupported GNU extensions.

Table 1. Unsupported GNU Extensions
Extension Comment
Sub-sections (such as .text 2) The sub-section number is ignored. As a workaround, you can create your own sections with the .section <name> directive. You may have an arbitrary number of text subsections with the names .text1, .text2, etc.
Assignment to location counter (such as . = .+4) As a workaround, you can advance the location counter with .space <expr>
Empty expressions defaulting to 0. For example, .byte , equivalent to (.byte 0,0) There is no workaround for this. You must always supply the arguments.
.linkonce directive The linker automatically detects logically-identical sections, and uses the following factors to determine whether to keep only one or both in the final image:
  • the binding of the symbols associated with each section.
  • the location of these two sections. For example, are the sections in the same overlay or overlay group? Is one in main, and the other in an overlay group?
.octa 16-byte numbers are not supported directly. As a workaround, you can use consecutive .long directives to build a large number in memory.
.quad 8-byte numbers are not supported directly. As a workaround, you can use consecutive .long directives to build a large number in memory.