From: Martin Hunt Date: Thu, 27 Mar 1997 08:44:55 +0000 (+0000) Subject: Thu Mar 27 00:42:28 1997 Martin M. Hunt X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8c0714dc0d7d62dff6df6f60b3411b4386ac5a99;p=binutils-gdb.git Thu Mar 27 00:42:28 1997 Martin M. Hunt * d30.exp: Add test case reloc. * reloc.[sd]: New files to test relocations. --- diff --git a/gas/testsuite/gas/d30v/reloc.d b/gas/testsuite/gas/d30v/reloc.d new file mode 100644 index 00000000000..78a966ba1af --- /dev/null +++ b/gas/testsuite/gas/d30v/reloc.d @@ -0,0 +1,39 @@ +#objdump: -dr +#name: D30V relocations + +.*: +file format elf32-d30v + +Disassembly of section .text: + +00000000 : + 0: 88082000 80000028 add r2, 0, 0x28 + 0: R_D30V_32 .text + 8: 88084000 80000000 add r4, 0, 0x0 + 8: R_D30V_32 .data + 10: 88084000 80000006 add r4, 0, 0x6 + 10: R_D30V_32 .data + 18: 88084000 80000000 add r4, 0, 0x0 + 18: R_D30V_32 unk + 20: 80080000 80000018 bra 38 + +00000028 : + 28: 48656c6c 6f20576f .long 0x48656c6c || .long 0x6f20576f + 30: 726c640a 00000000 .long 0x726c640a || bra 0 + +00000038 : + 38: 80180000 80000048 jmp 48 + 38: R_D30V_32 .text + 40: 088020c0 00f00000 abs r2, r3 || nop + +00000048 : + 48: 000bfff7 00f00000 bra 0 || nop + 50: 00180000 00f00000 jmp 0 || nop + 50: R_D30V_21 .text + 58: 000bfff5 80180000 bra 0 -> jmp 0 + 5c: R_D30V_21 .text + 60: 00180000 800bfff4 jmp 0 -> bra 0 + 60: R_D30V_21 .text + 68: 80080000 80000000 bra 68 + 68: R_D30V_32_PCREL unknown + 70: 80180000 80000000 jmp 0 + 70: R_D30V_32 unknown diff --git a/gas/testsuite/gas/d30v/reloc.s b/gas/testsuite/gas/d30v/reloc.s new file mode 100644 index 00000000000..6784aed88f3 --- /dev/null +++ b/gas/testsuite/gas/d30v/reloc.s @@ -0,0 +1,25 @@ + .text +start: + add r2, r0, hello + add r4, r0, bar + add r4, r0, bar2 + add r4, r0, unk + bra cont +hello: .ascii "Hello World\n" + .align 3 +cont: jmp cont2 + abs r2,r3 +cont2: + bra start || nop + jmp start || nop + bra start + jmp start + jmp start + bra start + bra unknown + jmp unknown + + .data +bar: .asciz "XYZZY" +bar2: .long 0xdeadbeef + \ No newline at end of file