2008-02-20 Paul Brook <paul@codesourcery.com>
[binutils-gdb.git] / gas / doc / c-arm.texi
1 @c Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
2 @c Free Software Foundation, Inc.
3 @c This is part of the GAS manual.
4 @c For copying conditions, see the file as.texinfo.
5
6 @ifset GENERIC
7 @page
8 @node ARM-Dependent
9 @chapter ARM Dependent Features
10 @end ifset
11
12 @ifclear GENERIC
13 @node Machine Dependencies
14 @chapter ARM Dependent Features
15 @end ifclear
16
17 @cindex ARM support
18 @cindex Thumb support
19 @menu
20 * ARM Options:: Options
21 * ARM Syntax:: Syntax
22 * ARM Floating Point:: Floating Point
23 * ARM Directives:: ARM Machine Directives
24 * ARM Opcodes:: Opcodes
25 * ARM Mapping Symbols:: Mapping Symbols
26 @end menu
27
28 @node ARM Options
29 @section Options
30 @cindex ARM options (none)
31 @cindex options for ARM (none)
32
33 @table @code
34
35 @cindex @code{-mcpu=} command line option, ARM
36 @item -mcpu=@var{processor}[+@var{extension}@dots{}]
37 This option specifies the target processor. The assembler will issue an
38 error message if an attempt is made to assemble an instruction which
39 will not execute on the target processor. The following processor names are
40 recognized:
41 @code{arm1},
42 @code{arm2},
43 @code{arm250},
44 @code{arm3},
45 @code{arm6},
46 @code{arm60},
47 @code{arm600},
48 @code{arm610},
49 @code{arm620},
50 @code{arm7},
51 @code{arm7m},
52 @code{arm7d},
53 @code{arm7dm},
54 @code{arm7di},
55 @code{arm7dmi},
56 @code{arm70},
57 @code{arm700},
58 @code{arm700i},
59 @code{arm710},
60 @code{arm710t},
61 @code{arm720},
62 @code{arm720t},
63 @code{arm740t},
64 @code{arm710c},
65 @code{arm7100},
66 @code{arm7500},
67 @code{arm7500fe},
68 @code{arm7t},
69 @code{arm7tdmi},
70 @code{arm7tdmi-s},
71 @code{arm8},
72 @code{arm810},
73 @code{strongarm},
74 @code{strongarm1},
75 @code{strongarm110},
76 @code{strongarm1100},
77 @code{strongarm1110},
78 @code{arm9},
79 @code{arm920},
80 @code{arm920t},
81 @code{arm922t},
82 @code{arm940t},
83 @code{arm9tdmi},
84 @code{arm9e},
85 @code{arm926e},
86 @code{arm926ej-s},
87 @code{arm946e-r0},
88 @code{arm946e},
89 @code{arm946e-s},
90 @code{arm966e-r0},
91 @code{arm966e},
92 @code{arm966e-s},
93 @code{arm968e-s},
94 @code{arm10t},
95 @code{arm10tdmi},
96 @code{arm10e},
97 @code{arm1020},
98 @code{arm1020t},
99 @code{arm1020e},
100 @code{arm1022e},
101 @code{arm1026ej-s},
102 @code{arm1136j-s},
103 @code{arm1136jf-s},
104 @code{arm1156t2-s},
105 @code{arm1156t2f-s},
106 @code{arm1176jz-s},
107 @code{arm1176jzf-s},
108 @code{mpcore},
109 @code{mpcorenovfp},
110 @code{cortex-a8},
111 @code{cortex-r4},
112 @code{cortex-m3},
113 @code{ep9312} (ARM920 with Cirrus Maverick coprocessor),
114 @code{i80200} (Intel XScale processor)
115 @code{iwmmxt} (Intel(r) XScale processor with Wireless MMX(tm) technology coprocessor)
116 and
117 @code{xscale}.
118 The special name @code{all} may be used to allow the
119 assembler to accept instructions valid for any ARM processor.
120
121 In addition to the basic instruction set, the assembler can be told to
122 accept various extension mnemonics that extend the processor using the
123 co-processor instruction space. For example, @code{-mcpu=arm920+maverick}
124 is equivalent to specifying @code{-mcpu=ep9312}. The following extensions
125 are currently supported:
126 @code{+maverick}
127 @code{+iwmmxt}
128 and
129 @code{+xscale}.
130
131 @cindex @code{-march=} command line option, ARM
132 @item -march=@var{architecture}[+@var{extension}@dots{}]
133 This option specifies the target architecture. The assembler will issue
134 an error message if an attempt is made to assemble an instruction which
135 will not execute on the target architecture. The following architecture
136 names are recognized:
137 @code{armv1},
138 @code{armv2},
139 @code{armv2a},
140 @code{armv2s},
141 @code{armv3},
142 @code{armv3m},
143 @code{armv4},
144 @code{armv4xm},
145 @code{armv4t},
146 @code{armv4txm},
147 @code{armv5},
148 @code{armv5t},
149 @code{armv5txm},
150 @code{armv5te},
151 @code{armv5texp},
152 @code{armv6},
153 @code{armv6j},
154 @code{armv6k},
155 @code{armv6z},
156 @code{armv6zk},
157 @code{armv7},
158 @code{armv7-a},
159 @code{armv7-r},
160 @code{armv7-m},
161 @code{iwmmxt}
162 and
163 @code{xscale}.
164 If both @code{-mcpu} and
165 @code{-march} are specified, the assembler will use
166 the setting for @code{-mcpu}.
167
168 The architecture option can be extended with the same instruction set
169 extension options as the @code{-mcpu} option.
170
171 @cindex @code{-mfpu=} command line option, ARM
172 @item -mfpu=@var{floating-point-format}
173
174 This option specifies the floating point format to assemble for. The
175 assembler will issue an error message if an attempt is made to assemble
176 an instruction which will not execute on the target floating point unit.
177 The following format options are recognized:
178 @code{softfpa},
179 @code{fpe},
180 @code{fpe2},
181 @code{fpe3},
182 @code{fpa},
183 @code{fpa10},
184 @code{fpa11},
185 @code{arm7500fe},
186 @code{softvfp},
187 @code{softvfp+vfp},
188 @code{vfp},
189 @code{vfp10},
190 @code{vfp10-r0},
191 @code{vfp9},
192 @code{vfpxd},
193 @code{arm1020t},
194 @code{arm1020e},
195 @code{arm1136jf-s}
196 and
197 @code{maverick}.
198
199 In addition to determining which instructions are assembled, this option
200 also affects the way in which the @code{.double} assembler directive behaves
201 when assembling little-endian code.
202
203 The default is dependent on the processor selected. For Architecture 5 or
204 later, the default is to assembler for VFP instructions; for earlier
205 architectures the default is to assemble for FPA instructions.
206
207 @cindex @code{-mthumb} command line option, ARM
208 @item -mthumb
209 This option specifies that the assembler should start assembling Thumb
210 instructions; that is, it should behave as though the file starts with a
211 @code{.code 16} directive.
212
213 @cindex @code{-mthumb-interwork} command line option, ARM
214 @item -mthumb-interwork
215 This option specifies that the output generated by the assembler should
216 be marked as supporting interworking.
217
218 @cindex @code{-mapcs} command line option, ARM
219 @item -mapcs @code{[26|32]}
220 This option specifies that the output generated by the assembler should
221 be marked as supporting the indicated version of the Arm Procedure.
222 Calling Standard.
223
224 @cindex @code{-matpcs} command line option, ARM
225 @item -matpcs
226 This option specifies that the output generated by the assembler should
227 be marked as supporting the Arm/Thumb Procedure Calling Standard. If
228 enabled this option will cause the assembler to create an empty
229 debugging section in the object file called .arm.atpcs. Debuggers can
230 use this to determine the ABI being used by.
231
232 @cindex @code{-mapcs-float} command line option, ARM
233 @item -mapcs-float
234 This indicates the floating point variant of the APCS should be
235 used. In this variant floating point arguments are passed in FP
236 registers rather than integer registers.
237
238 @cindex @code{-mapcs-reentrant} command line option, ARM
239 @item -mapcs-reentrant
240 This indicates that the reentrant variant of the APCS should be used.
241 This variant supports position independent code.
242
243 @cindex @code{-mfloat-abi=} command line option, ARM
244 @item -mfloat-abi=@var{abi}
245 This option specifies that the output generated by the assembler should be
246 marked as using specified floating point ABI.
247 The following values are recognized:
248 @code{soft},
249 @code{softfp}
250 and
251 @code{hard}.
252
253 @cindex @code{-eabi=} command line option, ARM
254 @item -meabi=@var{ver}
255 This option specifies which EABI version the produced object files should
256 conform to.
257 The following values are recognized:
258 @code{gnu},
259 @code{4}
260 and
261 @code{5}.
262
263 @cindex @code{-EB} command line option, ARM
264 @item -EB
265 This option specifies that the output generated by the assembler should
266 be marked as being encoded for a big-endian processor.
267
268 @cindex @code{-EL} command line option, ARM
269 @item -EL
270 This option specifies that the output generated by the assembler should
271 be marked as being encoded for a little-endian processor.
272
273 @cindex @code{-k} command line option, ARM
274 @cindex PIC code generation for ARM
275 @item -k
276 This option specifies that the output of the assembler should be marked
277 as position-independent code (PIC).
278
279 @cindex @code{--fix-v4bx} command line option, ARM
280 @item --fix-v4bx
281 Allow @code{BX} instructions in ARMv4 code. This is intended for use with
282 the linker option of the same name.
283
284 @end table
285
286
287 @node ARM Syntax
288 @section Syntax
289 @menu
290 * ARM-Chars:: Special Characters
291 * ARM-Regs:: Register Names
292 * ARM-Relocations:: Relocations
293 @end menu
294
295 @node ARM-Chars
296 @subsection Special Characters
297
298 @cindex line comment character, ARM
299 @cindex ARM line comment character
300 The presence of a @samp{@@} on a line indicates the start of a comment
301 that extends to the end of the current line. If a @samp{#} appears as
302 the first character of a line, the whole line is treated as a comment.
303
304 @cindex line separator, ARM
305 @cindex statement separator, ARM
306 @cindex ARM line separator
307 The @samp{;} character can be used instead of a newline to separate
308 statements.
309
310 @cindex immediate character, ARM
311 @cindex ARM immediate character
312 Either @samp{#} or @samp{$} can be used to indicate immediate operands.
313
314 @cindex identifiers, ARM
315 @cindex ARM identifiers
316 *TODO* Explain about /data modifier on symbols.
317
318 @node ARM-Regs
319 @subsection Register Names
320
321 @cindex ARM register names
322 @cindex register names, ARM
323 *TODO* Explain about ARM register naming, and the predefined names.
324
325 @node ARM Floating Point
326 @section Floating Point
327
328 @cindex floating point, ARM (@sc{ieee})
329 @cindex ARM floating point (@sc{ieee})
330 The ARM family uses @sc{ieee} floating-point numbers.
331
332 @node ARM-Relocations
333 @subsection ARM relocation generation
334
335 @cindex data relocations, ARM
336 @cindex ARM data relocations
337 Specific data relocations can be generated by putting the relocation name
338 in parentheses after the symbol name. For example:
339
340 @smallexample
341 .word foo(TARGET1)
342 @end smallexample
343
344 This will generate an @samp{R_ARM_TARGET1} relocation against the symbol
345 @var{foo}.
346 The following relocations are supported:
347 @code{GOT},
348 @code{GOTOFF},
349 @code{TARGET1},
350 @code{TARGET2},
351 @code{SBREL},
352 @code{TLSGD},
353 @code{TLSLDM},
354 @code{TLSLDO},
355 @code{GOTTPOFF}
356 and
357 @code{TPOFF}.
358
359 For compatibility with older toolchains the assembler also accepts
360 @code{(PLT)} after branch targets. This will generate the deprecated
361 @samp{R_ARM_PLT32} relocation.
362
363 @cindex MOVW and MOVT relocations, ARM
364 Relocations for @samp{MOVW} and @samp{MOVT} instructions can be generated
365 by prefixing the value with @samp{#:lower16:} and @samp{#:upper16}
366 respectively. For example to load the 32-bit address of foo into r0:
367
368 @smallexample
369 MOVW r0, #:lower16:foo
370 MOVT r0, #:upper16:foo
371 @end smallexample
372
373 @node ARM Directives
374 @section ARM Machine Directives
375
376 @cindex machine directives, ARM
377 @cindex ARM machine directives
378 @table @code
379
380 @cindex @code{align} directive, ARM
381 @item .align @var{expression} [, @var{expression}]
382 This is the generic @var{.align} directive. For the ARM however if the
383 first argument is zero (ie no alignment is needed) the assembler will
384 behave as if the argument had been 2 (ie pad to the next four byte
385 boundary). This is for compatibility with ARM's own assembler.
386
387 @cindex @code{req} directive, ARM
388 @item @var{name} .req @var{register name}
389 This creates an alias for @var{register name} called @var{name}. For
390 example:
391
392 @smallexample
393 foo .req r0
394 @end smallexample
395
396 @cindex @code{unreq} directive, ARM
397 @item .unreq @var{alias-name}
398 This undefines a register alias which was previously defined using the
399 @code{req}, @code{dn} or @code{qn} directives. For example:
400
401 @smallexample
402 foo .req r0
403 .unreq foo
404 @end smallexample
405
406 An error occurs if the name is undefined. Note - this pseudo op can
407 be used to delete builtin in register name aliases (eg 'r0'). This
408 should only be done if it is really necessary.
409
410 @cindex @code{dn} and @code{qn} directives, ARM
411 @item @var{name} .dn @var{register name} [@var{.type}] [[@var{index}]]
412 @item @var{name} .qn @var{register name} [@var{.type}] [[@var{index}]]
413
414 The @code{dn} and @code{qn} directives are used to create typed
415 and/or indexed register aliases for use in Advanced SIMD Extension
416 (Neon) instructions. The former should be used to create aliases
417 of double-precision registers, and the latter to create aliases of
418 quad-precision registers.
419
420 If these directives are used to create typed aliases, those aliases can
421 be used in Neon instructions instead of writing types after the mnemonic
422 or after each operand. For example:
423
424 @smallexample
425 x .dn d2.f32
426 y .dn d3.f32
427 z .dn d4.f32[1]
428 vmul x,y,z
429 @end smallexample
430
431 This is equivalent to writing the following:
432
433 @smallexample
434 vmul.f32 d2,d3,d4[1]
435 @end smallexample
436
437 Aliases created using @code{dn} or @code{qn} can be destroyed using
438 @code{unreq}.
439
440 @cindex @code{code} directive, ARM
441 @item .code @code{[16|32]}
442 This directive selects the instruction set being generated. The value 16
443 selects Thumb, with the value 32 selecting ARM.
444
445 @cindex @code{thumb} directive, ARM
446 @item .thumb
447 This performs the same action as @var{.code 16}.
448
449 @cindex @code{arm} directive, ARM
450 @item .arm
451 This performs the same action as @var{.code 32}.
452
453 @cindex @code{force_thumb} directive, ARM
454 @item .force_thumb
455 This directive forces the selection of Thumb instructions, even if the
456 target processor does not support those instructions
457
458 @cindex @code{thumb_func} directive, ARM
459 @item .thumb_func
460 This directive specifies that the following symbol is the name of a
461 Thumb encoded function. This information is necessary in order to allow
462 the assembler and linker to generate correct code for interworking
463 between Arm and Thumb instructions and should be used even if
464 interworking is not going to be performed. The presence of this
465 directive also implies @code{.thumb}
466
467 This directive is not neccessary when generating EABI objects. On these
468 targets the encoding is implicit when generating Thumb code.
469
470 @cindex @code{thumb_set} directive, ARM
471 @item .thumb_set
472 This performs the equivalent of a @code{.set} directive in that it
473 creates a symbol which is an alias for another symbol (possibly not yet
474 defined). This directive also has the added property in that it marks
475 the aliased symbol as being a thumb function entry point, in the same
476 way that the @code{.thumb_func} directive does.
477
478 @cindex @code{.ltorg} directive, ARM
479 @item .ltorg
480 This directive causes the current contents of the literal pool to be
481 dumped into the current section (which is assumed to be the .text
482 section) at the current location (aligned to a word boundary).
483 @code{GAS} maintains a separate literal pool for each section and each
484 sub-section. The @code{.ltorg} directive will only affect the literal
485 pool of the current section and sub-section. At the end of assembly
486 all remaining, un-empty literal pools will automatically be dumped.
487
488 Note - older versions of @code{GAS} would dump the current literal
489 pool any time a section change occurred. This is no longer done, since
490 it prevents accurate control of the placement of literal pools.
491
492 @cindex @code{.pool} directive, ARM
493 @item .pool
494 This is a synonym for .ltorg.
495
496 @cindex @code{.fnstart} directive, ARM
497 @item .unwind_fnstart
498 Marks the start of a function with an unwind table entry.
499
500 @cindex @code{.fnend} directive, ARM
501 @item .unwind_fnend
502 Marks the end of a function with an unwind table entry. The unwind index
503 table entry is created when this directive is processed.
504
505 If no personality routine has been specified then standard personality
506 routine 0 or 1 will be used, depending on the number of unwind opcodes
507 required.
508
509 @cindex @code{.cantunwind} directive, ARM
510 @item .cantunwind
511 Prevents unwinding through the current function. No personality routine
512 or exception table data is required or permitted.
513
514 @cindex @code{.personality} directive, ARM
515 @item .personality @var{name}
516 Sets the personality routine for the current function to @var{name}.
517
518 @cindex @code{.personalityindex} directive, ARM
519 @item .personalityindex @var{index}
520 Sets the personality routine for the current function to the EABI standard
521 routine number @var{index}
522
523 @cindex @code{.handlerdata} directive, ARM
524 @item .handlerdata
525 Marks the end of the current function, and the start of the exception table
526 entry for that function. Anything between this directive and the
527 @code{.fnend} directive will be added to the exception table entry.
528
529 Must be preceded by a @code{.personality} or @code{.personalityindex}
530 directive.
531
532 @cindex @code{.save} directive, ARM
533 @item .save @var{reglist}
534 Generate unwinder annotations to restore the registers in @var{reglist}.
535 The format of @var{reglist} is the same as the corresponding store-multiple
536 instruction.
537
538 @smallexample
539 @exdent @emph{core registers}
540 .save @{r4, r5, r6, lr@}
541 stmfd sp!, @{r4, r5, r6, lr@}
542 @exdent @emph{FPA registers}
543 .save f4, 2
544 sfmfd f4, 2, [sp]!
545 @exdent @emph{VFP registers}
546 .save @{d8, d9, d10@}
547 fstmdx sp!, @{d8, d9, d10@}
548 @exdent @emph{iWMMXt registers}
549 .save @{wr10, wr11@}
550 wstrd wr11, [sp, #-8]!
551 wstrd wr10, [sp, #-8]!
552 or
553 .save wr11
554 wstrd wr11, [sp, #-8]!
555 .save wr10
556 wstrd wr10, [sp, #-8]!
557 @end smallexample
558
559 @cindex @code{.vsave} directive, ARM
560 @item .vsave @var{vfp-reglist}
561 Generate unwinder annotations to restore the VFP registers in @var{vfp-reglist}
562 using FLDMD. Also works for VFPv3 registers
563 that are to be restored using VLDM.
564 The format of @var{vfp-reglist} is the same as the corresponding store-multiple
565 instruction.
566
567 @smallexample
568 @exdent @emph{VFP registers}
569 .vsave @{d8, d9, d10@}
570 fstmdd sp!, @{d8, d9, d10@}
571 @exdent @emph{VFPv3 registers}
572 .vsave @{d15, d16, d17@}
573 vstm sp!, @{d15, d16, d17@}
574 @end smallexample
575
576 Since FLDMX and FSTMX are now deprecated, this directive should be
577 used in favour of @code{.save} for saving VFP registers for ARMv6 and above.
578
579 @cindex @code{.pad} directive, ARM
580 @item .pad #@var{count}
581 Generate unwinder annotations for a stack adjustment of @var{count} bytes.
582 A positive value indicates the function prologue allocated stack space by
583 decrementing the stack pointer.
584
585 @cindex @code{.movsp} directive, ARM
586 @item .movsp @var{reg} [, #@var{offset}]
587 Tell the unwinder that @var{reg} contains an offset from the current
588 stack pointer. If @var{offset} is not specified then it is assumed to be
589 zero.
590
591 @cindex @code{.setfp} directive, ARM
592 @item .setfp @var{fpreg}, @var{spreg} [, #@var{offset}]
593 Make all unwinder annotations relaive to a frame pointer. Without this
594 the unwinder will use offsets from the stack pointer.
595
596 The syntax of this directive is the same as the @code{sub} or @code{mov}
597 instruction used to set the frame pointer. @var{spreg} must be either
598 @code{sp} or mentioned in a previous @code{.movsp} directive.
599
600 @smallexample
601 .movsp ip
602 mov ip, sp
603 @dots{}
604 .setfp fp, ip, #4
605 sub fp, ip, #4
606 @end smallexample
607
608 @cindex @code{.unwind_raw} directive, ARM
609 @item .raw @var{offset}, @var{byte1}, @dots{}
610 Insert one of more arbitary unwind opcode bytes, which are known to adjust
611 the stack pointer by @var{offset} bytes.
612
613 For example @code{.unwind_raw 4, 0xb1, 0x01} is equivalent to
614 @code{.save @{r0@}}
615
616 @cindex @code{.cpu} directive, ARM
617 @item .cpu @var{name}
618 Select the target processor. Valid values for @var{name} are the same as
619 for the @option{-mcpu} commandline option.
620
621 @cindex @code{.arch} directive, ARM
622 @item .arch @var{name}
623 Select the target architecture. Valid values for @var{name} are the same as
624 for the @option{-march} commandline option.
625
626 @cindex @code{.object_arch} directive, ARM
627 @item .object_arch @var{name}
628 Override the architecture recorded in the EABI object attribute section.
629 Valid values for @var{name} are the same as for the @code{.arch} directive.
630 Typically this is useful when code uses runtime detection of CPU features.
631
632 @cindex @code{.fpu} directive, ARM
633 @item .fpu @var{name}
634 Select the floating point unit to assemble for. Valid values for @var{name}
635 are the same as for the @option{-mfpu} commandline option.
636
637 @cindex @code{.eabi_attribute} directive, ARM
638 @item .eabi_attribute @var{tag}, @var{value}
639 Set the EABI object attribute number @var{tag} to @var{value}. The value
640 is either a @code{number}, @code{"string"}, or @code{number, "string"}
641 depending on the tag.
642
643 @end table
644
645 @node ARM Opcodes
646 @section Opcodes
647
648 @cindex ARM opcodes
649 @cindex opcodes for ARM
650 @code{@value{AS}} implements all the standard ARM opcodes. It also
651 implements several pseudo opcodes, including several synthetic load
652 instructions.
653
654 @table @code
655
656 @cindex @code{NOP} pseudo op, ARM
657 @item NOP
658 @smallexample
659 nop
660 @end smallexample
661
662 This pseudo op will always evaluate to a legal ARM instruction that does
663 nothing. Currently it will evaluate to MOV r0, r0.
664
665 @cindex @code{LDR reg,=<label>} pseudo op, ARM
666 @item LDR
667 @smallexample
668 ldr <register> , = <expression>
669 @end smallexample
670
671 If expression evaluates to a numeric constant then a MOV or MVN
672 instruction will be used in place of the LDR instruction, if the
673 constant can be generated by either of these instructions. Otherwise
674 the constant will be placed into the nearest literal pool (if it not
675 already there) and a PC relative LDR instruction will be generated.
676
677 @cindex @code{ADR reg,<label>} pseudo op, ARM
678 @item ADR
679 @smallexample
680 adr <register> <label>
681 @end smallexample
682
683 This instruction will load the address of @var{label} into the indicated
684 register. The instruction will evaluate to a PC relative ADD or SUB
685 instruction depending upon where the label is located. If the label is
686 out of range, or if it is not defined in the same file (and section) as
687 the ADR instruction, then an error will be generated. This instruction
688 will not make use of the literal pool.
689
690 @cindex @code{ADRL reg,<label>} pseudo op, ARM
691 @item ADRL
692 @smallexample
693 adrl <register> <label>
694 @end smallexample
695
696 This instruction will load the address of @var{label} into the indicated
697 register. The instruction will evaluate to one or two PC relative ADD
698 or SUB instructions depending upon where the label is located. If a
699 second instruction is not needed a NOP instruction will be generated in
700 its place, so that this instruction is always 8 bytes long.
701
702 If the label is out of range, or if it is not defined in the same file
703 (and section) as the ADRL instruction, then an error will be generated.
704 This instruction will not make use of the literal pool.
705
706 @end table
707
708 For information on the ARM or Thumb instruction sets, see @cite{ARM
709 Software Development Toolkit Reference Manual}, Advanced RISC Machines
710 Ltd.
711
712 @node ARM Mapping Symbols
713 @section Mapping Symbols
714
715 The ARM ELF specification requires that special symbols be inserted
716 into object files to mark certain features:
717
718 @table @code
719
720 @cindex @code{$a}
721 @item $a
722 At the start of a region of code containing ARM instructions.
723
724 @cindex @code{$t}
725 @item $t
726 At the start of a region of code containing THUMB instructions.
727
728 @cindex @code{$d}
729 @item $d
730 At the start of a region of data.
731
732 @end table
733
734 The assembler will automatically insert these symbols for you - there
735 is no need to code them yourself. Support for tagging symbols ($b,
736 $f, $p and $m) which is also mentioned in the current ARM ELF
737 specification is not implemented. This is because they have been
738 dropped from the new EABI and so tools cannot rely upon their
739 presence.
740