You copied the Doc URL to your clipboard.

21.50 LTORG

The LTORG directive instructs the assembler to assemble the current literal pool immediately.




The assembler assembles the current literal pool at the endof every code section. The end of a code section is determined bythe AREA directive at the beginning of thefollowing section, or the end of the assembly.

These default literal pools can sometimes be out of rangeof some LDR, VLDR,and WLDR pseudo-instructions. Use LTORG toensure that a literal pool is assembled within range.

Large programs can require several literal pools. Place LTORG directivesafter unconditional branches or subroutine return instructions sothat the processor does not attempt to execute the constants asinstructions.

The assembler word-aligns data in literal pools.


        AREA    Example, CODE, READONLYstart   BL      func1func1                           ; function body        ; code        LDR     r1,=0x55555555  ; => LDR R1, [pc, #offset to Literal Pool 1]        ; code        MOV     pc,lr           ; end function        LTORG                   ; Literal Pool 1 contains literal &    SPACE   4200            ; Clears 4200 bytes of memory starting at current location.         END                     ; Default literal pool is empty.
Was this page helpful? Yes No