diff options
author | Paul Brook <paul@codesourcery.com> | 2006-05-11 15:17:34 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2006-05-11 15:17:34 +0000 |
commit | b6895b4f375bfb1de5a8d33b3af600c5d92314d8 (patch) | |
tree | 270b1929d939066a8b43f6cabfa3d6282c7dacdd /gas/doc | |
parent | e28387c3bf6b1358d3a438443fc790c8e0fefa22 (diff) | |
download | gdb-b6895b4f375bfb1de5a8d33b3af600c5d92314d8.zip gdb-b6895b4f375bfb1de5a8d33b3af600c5d92314d8.tar.gz gdb-b6895b4f375bfb1de5a8d33b3af600c5d92314d8.tar.bz2 |
2006-05-11 Paul Brook <paul@codesourcery.com>
bfd/
* elf32-arm.c (elf32_arm_reloc_map): Add MOVW and MOVT relocs.
(elf32_arm_final_link_relocate): Handle MOVW and MOVT relocs.
(elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
* reloc.c: Ditto.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
* libcoff.h: Regenerate.
gas/
* config/tc-arm.c (parse_half): New function.
(operand_parse_code): Remove OP_Iffff. Add OP_HALF.
(parse_operands): Ditto.
(do_mov16): Reject invalid relocations.
(do_t_mov16): Ditto. Use Thumb reloc numbers.
(insns): Replace Iffff with HALF.
(md_apply_fix): Add MOVW and MOVT relocs.
(tc_gen_reloc): Ditto.
* doc/c-arm.texi: Document relocation operators
ld/testsuite/
* ld-arm/arm-elf.exp: Add arm-movwt.
* ld-arm/arm-movwt.d: New test.
* ld-arm/arm-movwt.s: New test.
* ld-arm/arm.ld: Add .far.
Diffstat (limited to 'gas/doc')
-rw-r--r-- | gas/doc/c-arm.texi | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/gas/doc/c-arm.texi b/gas/doc/c-arm.texi index ca0998b..0b113f9 100644 --- a/gas/doc/c-arm.texi +++ b/gas/doc/c-arm.texi @@ -284,6 +284,7 @@ as position-independent code (PIC). @menu * ARM-Chars:: Special Characters * ARM-Regs:: Register Names +* ARM-Relocations:: Relocations @end menu @node ARM-Chars @@ -323,7 +324,46 @@ Either @samp{#} or @samp{$} can be used to indicate immediate operands. @cindex ARM floating point (@sc{ieee}) The ARM family uses @sc{ieee} floating-point numbers. +@node ARM-Relocations +@subsection ARM relocation generation +@cindex data relocations, ARM +@cindex ARM data relocations +Specific data relocations can be generated by putting the relocation name +in parentheses after the symbol name. For example: + +@smallexample + .word foo(TARGET1) +@end smallexample + +This will generate an @samp{R_ARM_TARGET1} relocation against the symbol +@var{foo}. +The following relocations are supported: +@code{GOT}, +@code{GOTOFF}, +@code{TARGET1}, +@code{TARGET2}, +@code{SBREL}, +@code{TLSGD}, +@code{TLSLDM}, +@code{TLSLDO}, +@code{GOTTPOFF} +and +@code{TPOFF}. + +For compatibility with older toolchains the assembler also accepts +@code{(PLT)} after branch targets. This will generate the deprecated +@samp{R_ARM_PLT32} relocation. + +@cindex MOVW and MOVT relocations, ARM +Relocations for @samp{MOVW} and @samp{MOVT} instructions can be generated +by prefixing the value with @samp{#:lower16:} and @samp{#:upper16} +respectively. For example to load the 32-bit addresss of foo into r0: + +@smallexample + MOVW r0, #:lower16:foo + MOVT r0, #:upper16:foo +@end smallexample @node ARM Directives @section ARM Machine Directives |