5.8.51. LTORG directive

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

Syntax

The syntax of LTORG is:

LTORG

Usage

The assembler executes an LTORG directiveat the end of every code area, as defined by the AREA directive at the beginning of the following area, or the end of the assembly.

Use LTORG to ensure that literal pools are assembled within range of the LDR, LDFD, and LDFS pseudo-instructions. Refer to LDR ARM pseudo-instruction and LDR Thumb pseudo-instruction for more information. Large programs may require several literal pools.

Place LTORG directives after unconditional branches or subroutine return instructions so that the processor does not attempt to execute the constants as instructions.

The assembler word-aligns data in literal pools.

Example

		AREA 		Example, CODE, READONLY
start		BL 		func1
func1								; 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 &55555555.
data		%   		4200				; Clears 4200 bytes of memory, 
								; starting at current location.
		END						; Default literal pool is empty.
Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0041C
Non-Confidential