llvm-project/lld/test/ELF/hexagon-shared.s

32 lines
905 B
ArmAsm
Raw Normal View History

# REQUIRES: hexagon
# RUN: llvm-mc -filetype=obj -triple=hexagon-unknown-elf %s -o %t
# RUN: llvm-mc -filetype=obj -triple=hexagon-unknown-elf %S/Inputs/hexagon-shared.s -o %t2.o
# RUN: ld.lld -shared %t2.o -soname %t3.so -o %t3.so
# RUN: ld.lld -shared %t %t3.so -soname %t4.so -o %t4.so
# RUN: llvm-objdump -d -j=.plt %t4.so | FileCheck --check-prefix=PLT %s
# RUN: llvm-objdump -d -j=.text %t4.so | FileCheck --check-prefix=TEXT %s
.global foo
foo:
# _HEX_32_PCREL
.word _DYNAMIC - .
call ##bar
# R_HEX_PLT_B22_PCREL
call bar@PLT
# PLT: { immext(#65472
# PLT: r28 = add(pc,##65520) }
# PLT: { r14 -= add(r28,#16)
# PLT: r15 = memw(r28+#8)
# PLT: r28 = memw(r28+#4) }
# PLT: { r14 = asr(r14,#2)
# PLT: jumpr r28 }
# PLT: { trap0(#219) }
# PLT: immext(#65472)
# PLT: r14 = add(pc,##65488) }
# PLT: r28 = memw(r14+#0) }
# PLT: jumpr r28 }
# TEXT: 10000: 00 00 01 00 00010000
# TEXT: { call 0x10030 }