SPNU118Z September 1995 – March 2023 66AK2E05 , 66AK2H06 , 66AK2H12 , 66AK2H14 , AM1705 , AM1707 , AM1802 , AM1806 , AM1808 , AM1810 , AM5K2E04 , OMAP-L132 , OMAP-L137 , OMAP-L138 , SM470R1B1M-HT , TMS470R1A288 , TMS470R1A384 , TMS470R1A64 , TMS470R1B1M , TMS470R1B512 , TMS470R1B768
Figure 2-2 shows how you can build sections incrementally, using the sections directives to swap back and forth between the different sections. You can use sections directives to begin assembling into a section for the first time, or to continue assembling into a section that already contains code. In the latter case, the assembler simply appends the new code to the code that is already in the section.
The format in Figure 2-2 is a listing file. Figure 2-2 shows how the SPCs are modified during assembly. A line in a listing file has four fields:
Field 1 | contains the source code line counter. |
Field 2 | contains the section program counter. |
Field 3 | contains the object code. |
Field 4 | contains the original source statement. |
See Section 4.12 for more information on interpreting the fields in a source listing.
As Figure 2-3 shows, the file in Figure 2-2 creates five sections:
.text | contains six 32-bit words of object code. |
.data | contains seven 32-bit words of initialized data. |
vectors | is a user-named section created with the .sect directive; it contains two 32-bit words of initialized data. |
.bss | reserves ten bytes in memory. |
newvars | is a user-named section created with the .usect directive; it reserves eight bytes in memory. |
The second column shows the object code that is assembled into these sections; the first column shows the source statements that generated the object code.