mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
a9f02af88d
gas/ * config/tc-arm.c (do_arit): Protect against bad relocations usage. (do_mov): Likewise. (do_t_add_sub): Allow pcrop relocations for Thumb-2 targets. (do_t_mov_cmp): Likewise. (do_t_add_sub): Protect against bad relocations usage. (do_t_mov_cmp): Likewise. gas/testsuite/ * gas/arm/adds-thumb1-reloc-local-armv7-m.s: New. * gas/arm/adds-thumb1-reloc-local-armv7-m.d: New. * gas/arm/movs-thumb1-reloc-local-armv7-m.s: New. * gas/arm/movs-thumb1-reloc-local-armv7-m.d: New. ld/ * testsuite/ld-arm/arm-elf.exp: New tests. * testsuite/ld-arm/thumb1-adds-armv7-m.s: New. * testsuite/ld-arm/thumb1-movs-armv7-m.s: New.
44 lines
919 B
ArmAsm
44 lines
919 B
ArmAsm
.text
|
|
.arch armv7-m
|
|
.syntax unified
|
|
.global _start
|
|
.thumb_func
|
|
.type _start, %function
|
|
_start:
|
|
.thumb_func
|
|
.type thumb1, %function
|
|
thumb1:
|
|
movs r0, #:upper8_15:#thumb3
|
|
movs r1, #:upper0_7:#thumb3
|
|
movs r2, #:lower8_15:#thumb1
|
|
movs r3, #:lower0_7:#thumb1
|
|
movs r4, #:lower0_7:#thumb3
|
|
movs r5, #:lower8_15:#thumb3
|
|
movs r6, #:upper0_7:#thumb1
|
|
movs r7, #:upper8_15:#thumb1
|
|
.thumb_func
|
|
.type thumb2, %function
|
|
thumb2:
|
|
movs r0, #:upper8_15:#(thumb3 + 0)
|
|
movs r1, #:upper0_7:#(thumb2 + 1)
|
|
movs r2, #:lower8_15:#(var1 + 255)
|
|
movs r3, #:lower0_7:#var1
|
|
movs r7, #:upper8_15:#var1 + 4
|
|
movs r6, #:upper0_7:#var2
|
|
movs r5, #:lower8_15:#var2 + 0xff
|
|
movs r4, #:lower0_7:#var2 - (-1)
|
|
var1:
|
|
.byte 1
|
|
var2:
|
|
.byte 2
|
|
|
|
.section .far, "ax", %progbits
|
|
.thumb_func
|
|
.type thumb3, %function
|
|
thumb3:
|
|
movs r0, #:upper8_15:#thumb1
|
|
movs r1, #:upper0_7:#thumb2
|
|
movs r2, #:lower8_15:#thumb3
|
|
movs r3, #:lower0_7:#thumb1
|
|
|