aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-sparc/gotop64.dd
diff options
context:
space:
mode:
authorDavid S. Miller <davem@redhat.com>2008-04-16 08:51:18 +0000
committerDavid S. Miller <davem@redhat.com>2008-04-16 08:51:18 +0000
commit739f7f82beda72a2702c814d5a8af90a91b1c30d (patch)
tree223b463a3e96dd2b75666140540c090a9ecd5b64 /ld/testsuite/ld-sparc/gotop64.dd
parent14a6d8e0dfbb4359a08c77c46e335dbce4c36cfc (diff)
downloadgdb-739f7f82beda72a2702c814d5a8af90a91b1c30d.zip
gdb-739f7f82beda72a2702c814d5a8af90a91b1c30d.tar.gz
gdb-739f7f82beda72a2702c814d5a8af90a91b1c30d.tar.bz2
bfd/
* reloc.c (BFD_RELOC_SPARC_GOTDATA_HIX22, BFD_RELOC_SPARC_GOTDATA_LOX10, BFD_RELOC_SPARC_GOTDATA_OP_HIX22, BFD_RELOC_SPARC_GOTDATA_OP_LOX10, BFD_RELOC_SPARC_GOTDATA_OP): New. * libbfd.h: Regnerate. * bfd-in2.h: Regenerate. * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Add entries for GOTDATA relocations. (sparc_reloc_map): Likewise. (_bfd_sparc_elf_check_relocs): Handle R_SPARC_GOTDATA_* like R_SPARC_GOT*. (_bfd_sparc_elf_gc_sweep_hook): Likewise. (_bfd_sparc_elf_relocate_section): Transform R_SPARC_GOTDATA_HIX22, R_SPARC_GOTDATA_LOX10, R_SPARC_GOTDATA_OP_HIX22, and R_SPARC_GOTDATA_OP_LOX10 into the equivalent R_SPARC_GOT* reloc. Simply ignore R_SPARC_GOTDATA_OP relocations. gas/ * config/tc-sparc.c (sparc_ip): Add support for gotdata mnemonics and relocation generation. (tc_gen_reloc): Likewise. gas/testsuite/ * gas/sparc/gotops32.d: New. * gas/sparc/gotops32.s: Likewise. * gas/sparc/gotops64.d: Likewise. * gas/sparc/gotops64.s: Likewise. * gas/sparc/sparc.exp: Run new gotdata tests. ld/testsuite/ * ld-sparc/gotop32.dd: New. * ld-sparc/gotop32.rd: Likewise. * ld-sparc/gotop32.s: Likewise. * ld-sparc/gotop32.sd: Likewise. * ld-sparc/gotop32.td: Likewise. * ld-sparc/gotop64.dd: Likewise. * ld-sparc/gotop64.rd: Likewise. * ld-sparc/gotop64.s: Likewise. * ld-sparc/gotop64.sd: Likewise. * ld-sparc/gotop64.td: Likewise. * ld-sparc/sparc.exp: Run new gotdata tests.
Diffstat (limited to 'ld/testsuite/ld-sparc/gotop64.dd')
-rw-r--r--ld/testsuite/ld-sparc/gotop64.dd28
1 files changed, 28 insertions, 0 deletions
diff --git a/ld/testsuite/ld-sparc/gotop64.dd b/ld/testsuite/ld-sparc/gotop64.dd
new file mode 100644
index 0000000..a78f55a
--- /dev/null
+++ b/ld/testsuite/ld-sparc/gotop64.dd
@@ -0,0 +1,28 @@
+#source: gotop64.s
+#as: --64 -K PIC
+#ld: -shared -melf64_sparc
+#objdump: -drj.text
+#target: sparc*-*-*
+
+.*: +file format elf64-sparc
+
+Disassembly of section .text:
+0000000000001000 <foo-0x8>:
+ +1000: 81 c3 e0 08 retl *
+ +1004: ae 03 c0 17 add %o7, %l7, %l7
+
+0000000000001008 <foo>:
+ +1008: 9d e3 bf 60 save %sp, -160, %sp
+ +100c: 2f 00 04 04 sethi %hi\(0x101000\), %l7
+ +1010: 7f ff ff fc call 1000 <_.*>
+ +1014: ae 05 e0 d0 add %l7, 0xd0, %l7 ! 1010d0 <.*>
+ +1018: 01 00 00 00 nop *
+ +101c: 23 00 00 08 sethi %hi\(0x2000\), %l1
+ +1020: 01 00 00 00 nop *
+ +1024: a2 1c 60 08 xor %l1, 8, %l1
+ +1028: 01 00 00 00 nop *
+ +102c: f0 5d c0 11 ldx \[ %l7 \+ %l1 \], %i0
+ +1030: 01 00 00 00 nop *
+ +1034: 81 c7 e0 08 ret
+ +1038: 81 e8 00 00 restore
+#pass