diff options
author | Nick Clifton <nickc@redhat.com> | 2010-03-18 11:22:46 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2010-03-18 11:22:46 +0000 |
commit | b43420e6cdbc2b1ae000f4671470d208ac7241a9 (patch) | |
tree | 461a0ff104afd4e004535bc1f70ce12c0ed688f1 /gas/testsuite | |
parent | 17299ac7f6d12ac5286a490e43c0cdb75abc0f21 (diff) | |
download | gdb-b43420e6cdbc2b1ae000f4671470d208ac7241a9.zip gdb-b43420e6cdbc2b1ae000f4671470d208ac7241a9.tar.gz gdb-b43420e6cdbc2b1ae000f4671470d208ac7241a9.tar.bz2 |
bfd/
2010-03-15 Wei Guozhi <carrot@google.com>
PR gas/11323
* bfd-in2.h (enum bfd_reloc_code_real): New BFD_RELOC_GOT_PREL type.
* elf32-arm.c (elf32_arm_reloc_map): BFD_RELOC_GOT_PREL to
R_ARM_GOT_PREL map.
* libbfd.h (bfd_reloc_code_real_names): BFD_RELOC_GOT_PREL name.
* reloc.c (comments): Document the new relocation.
gas/
2010-03-15 Wei Guozhi <carrot@google.com>
PR gas/11323
* config/tc-arm.c (reloc_names): New relocation names.
(md_apply_fix): New case for BFD_RELOC_ARM_GOT_PREL.
(tc_gen_reloc): New case for BFD_RELOC_ARM_GOT_PREL.
* doc/c-arm.texi (ARM-Relocations): Document the new relocation.
gas/testsuite
2010-03-15 Wei Guozhi <carrot@google.com>
PR gas/11323
* gas/arm/got_prel.s: New test case.
* gas/arm/got_prel.d: Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/got_prel.d | 19 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/got_prel.s | 23 |
3 files changed, 48 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index dd0807e..86d14dc 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2010-03-18 Wei Guozhi <carrot@google.com> + + PR gas/11323 + * gas/arm/got_prel.s: New test case. + * gas/arm/got_prel.d: Expected disassembly. + 2010-03-17 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/i386.exp: Run list-1, list-2 and list-3 only for diff --git a/gas/testsuite/gas/arm/got_prel.d b/gas/testsuite/gas/arm/got_prel.d new file mode 100644 index 0000000..ad74dfc --- /dev/null +++ b/gas/testsuite/gas/arm/got_prel.d @@ -0,0 +1,19 @@ +# name: R_ARM_GOT_PREL relocation +# source: got_prel.s +# as: -march=armv5te -meabi=5 +# readelf: -x 4 -r +# target: *-*-*eabi *-*-symbianelf *-*-linux-* *-*-elf + +Relocation section '.rel.text.foo' at offset 0x3f0 contains 1 entries: + Offset Info Type Sym.Value Sym. Name +00000010 00000c60 R_ARM_GOT_PREL 00000000 i + +Relocation section '.rel.ARM.exidx.text.foo' at offset 0x3f8 contains 2 entries: + Offset Info Type Sym.Value Sym. Name +00000000 0000042a R_ARM_PREL31 00000000 .text.foo +00000000 00000d00 R_ARM_NONE 00000000 __aeabi_unwind_cpp_pr0 + +Hex dump of section '.text.foo': + NOTE: This section has relocations against it, but these have NOT been applied to this dump. + 0x00000000 034b7b44 1b681a68 1860101c 7047c046 .K{D.h.h.`..pG.F + 0x00000010 0a000000 .... diff --git a/gas/testsuite/gas/arm/got_prel.s b/gas/testsuite/gas/arm/got_prel.s new file mode 100644 index 0000000..9628d47 --- /dev/null +++ b/gas/testsuite/gas/arm/got_prel.s @@ -0,0 +1,23 @@ + .code 16 + .text +.Ltext0: + .section .text.foo,"ax",%progbits + .align 2 + .global foo + .code 16 + .thumb_func + .type foo, %function +foo: + .fnstart + ldr r3, .L3 +.LPIC0: + add r3, pc + ldr r3, [r3] + ldr r2, [r3] + str r0, [r3] + mov r0, r2 + bx lr + .align 2 +.L3: + .word i(GOT_PREL) + (. - (.LPIC0+4)) + .fnend |