binutils-gdb/ld/testsuite/ld-arm/ifunc-7.s
Jiong Wang 52db4ec2d1 [ARM] Reject R_ARM_REL32 when trying to defer it to runtime
bfd/
    * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
    trying to defer them to runtime.

  ld/testsuite/
    * ld-arm/elf32-reject.s: New testcase.
    * ld-arm/elf32-reject.d: Likewise.
    * ld-arm/elf32-reject-pie.s: Likewise.
    * ld-arm/elf32-reject-pie.d: Likewise.
    * ld-arm/arm-elf.exp: Run new testcases.
    * ld-arm/ifunc-7.s: Delete f2/f4 test items.
    * ld-arm/ifunc-7.rd: Likewise.
    * ld-arm/ifunc-7.gd: Likewise.
    * ld-arm/ifunc-7.dd: Likewise.
    * ld-arm/ifunc-8.s: Likewise.
    * ld-arm/ifunc-8.rd: Likewise.
    * ld-arm/ifunc-8.gd: Likewise.
    * ld-arm/ifunc-8.dd: Likewise.
2015-01-14 19:11:54 +00:00

41 lines
440 B
ArmAsm

.macro define,name
.text
.type \name,%gnu_indirect_function
\name:
mov pc,lr
.size \name,.-\name
.endm
.macro test_relocs,name
bl \name(PLT)
ldr r4,1f
ldr r4,2f
1:
.word \name(GOT)
2:
.word \name(GOT_PREL)
.data
.word \name
.word \name - .
.text
.endm
.globl f3
.hidden f3
define f1
define f3
.data
foo:
.word 0x11223344
.text
.globl arm
arm:
test_relocs foo
test_relocs f1
test_relocs f3
.size arm,.-arm