95 lines · plain
1# REQUIRES: aarch642# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %p/Inputs/aarch64-tstbr14-reloc.s -o %t13# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %s -o %t24# RUN: ld.lld %t1 %t2 -o %t5# RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t | FileCheck %s6# RUN: ld.lld -shared %t1 %t2 -o %t37# RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t3 | FileCheck --check-prefix=DSO %s8# RUN: llvm-readobj -S -r %t3 | FileCheck -check-prefix=DSOREL %s9 10# CHECK: <_foo>:11# CHECK-NEXT: 210120: nop12# CHECK-NEXT: 210124: nop13# CHECK-NEXT: 210128: nop14# CHECK-NEXT: 21012c: nop15# CHECK: <_bar>:16# CHECK-NEXT: 210130: nop17# CHECK-NEXT: 210134: nop18# CHECK-NEXT: 210138: nop19# CHECK: <_start>:20# CHECK-NEXT: 21013c: tbnz w3, #15, 0x210120 <_foo>21# CHECK-NEXT: 210140: tbnz w3, #15, 0x210130 <_bar>22# CHECK-NEXT: 210144: tbz x6, #45, 0x210120 <_foo>23# CHECK-NEXT: 210148: tbz x6, #45, 0x210130 <_bar>24 25#DSOREL: Section {26#DSOREL: Index:27#DSOREL: Name: .got.plt28#DSOREL-NEXT: Type: SHT_PROGBITS29#DSOREL-NEXT: Flags [30#DSOREL-NEXT: SHF_ALLOC31#DSOREL-NEXT: SHF_WRITE32#DSOREL-NEXT: ]33#DSOREL-NEXT: Address: 0x3042034#DSOREL-NEXT: Offset: 0x42035#DSOREL-NEXT: Size: 4036#DSOREL-NEXT: Link: 037#DSOREL-NEXT: Info: 038#DSOREL-NEXT: AddressAlignment: 839#DSOREL-NEXT: EntrySize: 040#DSOREL-NEXT: }41#DSOREL: Relocations [42#DSOREL-NEXT: Section ({{.*}}) .rela.plt {43#DSOREL-NEXT: 0x30438 R_AARCH64_JUMP_SLOT _foo44#DSOREL-NEXT: 0x30440 R_AARCH64_JUMP_SLOT _bar45#DSOREL-NEXT: }46#DSOREL-NEXT:]47 48#DSO: Disassembly of section .text:49#DSO-EMPTY:50#DSO-NEXT: <_foo>:51#DSO-NEXT: 102f8: nop52#DSO-NEXT: 102fc: nop53#DSO-NEXT: 10300: nop54#DSO-NEXT: 10304: nop55#DSO: <_bar>:56#DSO-NEXT: 10308: nop57#DSO-NEXT: 1030c: nop58#DSO-NEXT: 10310: nop59#DSO: <_start>:60#DSO-NEXT: 10314: tbnz w3, #15, 0x10350 <_foo@plt>61#DSO-NEXT: 10318: tbnz w3, #15, 0x10360 <_bar@plt>62#DSO-NEXT: 1031c: tbz x6, #45, 0x10350 <_foo@plt>63#DSO-NEXT: 10320: tbz x6, #45, 0x10360 <_bar@plt>64#DSO-EMPTY:65#DSO-NEXT: Disassembly of section .plt:66#DSO-EMPTY:67#DSO-NEXT: <.plt>:68#DSO-NEXT: 10330: stp x16, x30, [sp, #-16]!69#DSO-NEXT: 10334: adrp x16, 0x3000070#DSO-NEXT: 10338: ldr x17, [x16, #1072]71#DSO-NEXT: 1033c: add x16, x16, #107272#DSO-NEXT: 10340: br x1773#DSO-NEXT: 10344: nop74#DSO-NEXT: 10348: nop75#DSO-NEXT: 1034c: nop76#DSO-EMPTY:77#DSO-NEXT: <_foo@plt>:78#DSO-NEXT: 10350: adrp x16, 0x3000079#DSO-NEXT: 10354: ldr x17, [x16, #1080]80#DSO-NEXT: 10358: add x16, x16, #108081#DSO-NEXT: 1035c: br x1782#DSO-EMPTY:83#DSO-NEXT: <_bar@plt>:84#DSO-NEXT: 10360: adrp x16, 0x3000085#DSO-NEXT: 10364: ldr x17, [x16, #1088]86#DSO-NEXT: 10368: add x16, x16, #108887#DSO-NEXT: 1036c: br x1788 89.globl _start90_start:91 tbnz w3, #15, _foo92 tbnz w3, #15, _bar93 tbz x6, #45, _foo94 tbz x6, #45, _bar95