binutils-gdb/ld/testsuite/ld-mips-elf/reloc-3a.s
Richard Sandiford 18ab192184 * ld-mips-elf/reloc-1[ab].s: New source files.
* ld-mips-elf/reloc-1-{n32,n64,rel}.d: New tests.
	* ld-mips-elf/reloc-2[ab].s: New source files.
	* ld-mips-elf/reloc-2.{d,ld}: New test.
	* ld-mips-elf/reloc-3[ab].s: New source files.
	* ld-mips-elf/reloc-3-{r,srec}.d: New tests.
	* ld-mips-elf/mips-elf.exp: Run them.
2003-12-18 10:25:12 +00:00

39 lines
984 B
ArmAsm

.globl _start
.globl gd
.ent tstarta
tstarta:
_start:
la $4,lda-tstarta-0x8010
# (.text2+8-0x8010) - tstarta [+ (tstarta+0x4)]
# relocation: .text2 - 0x8004
# final value: .text2 - tstarta - 0x8008
la $4,lda-tstarta-0x8000
# (.text2+8-0x8000) - tstarta [+ (tstarta+0xc)]
# relocation: .text2 - 0x7fec
# final value: .text2 - tstarta - 0x7ff8
la $4,lda-tstarta
# (.text2+8) - tstarta [+ (tstarta+0x14)]
# relocation: .text2 + 0x1c
# final value: .text2 - tstarta + 0x8
la $4,lda-tstarta+0x7ff0
# (.text2+8+0x7ff0) - tstarta [+ (tstarta+0x1c)]
# relocation: .text2 + 0x8014
# final value: .text2 - tstarta + 0x7ff8
la $4,lda-tstarta+0x8010 # (.text2+8)-(tstarta+0x8010)+0x24
# (.text2+8+0x8010) - tstarta [+ (tstarta+0x24)]
# relocation: .text2 + 0x803c
# final value: .text2 - tstarta + 0x8018
.end tstarta
.org 0xfff0
.section .text2
.word 1
gd: .word 2
lda: .word 3
.word 4