2018-09-28 22:09:16 +08:00
|
|
|
# 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
|
2018-10-02 02:27:26 +08:00
|
|
|
# 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
|
2018-09-28 22:09:16 +08:00
|
|
|
|
|
|
|
.global foo
|
|
|
|
foo:
|
2018-10-02 02:27:26 +08:00
|
|
|
# _HEX_32_PCREL
|
|
|
|
.word _DYNAMIC - .
|
2018-09-28 22:09:16 +08:00
|
|
|
call ##bar
|
2018-10-02 02:27:26 +08:00
|
|
|
# R_HEX_PLT_B22_PCREL
|
|
|
|
call bar@PLT
|
2018-09-28 22:09:16 +08:00
|
|
|
|
2018-10-02 02:27:26 +08:00
|
|
|
# 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 }
|