brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.2 KiB · 30b8437 Raw
110 lines · plain
1# REQUIRES: aarch642# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %p/Inputs/aarch64-condb-reloc.s -o %t1.o3# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %s -o %t2.o4# RUN: ld.lld %t1.o %t2.o -o %t5# RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t | FileCheck %s6# RUN: ld.lld -shared %t1.o %t2.o -o %t.so7# RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t.so | FileCheck --check-prefix=DSO %s8# RUN: llvm-readobj -S -r %t.so | FileCheck -check-prefix=DSOREL %s9 10# 0x11024 - 36 = 0x1100011# 0x11028 - 24 = 0x1101012# 0x1102c - 16 = 0x1101c13# CHECK:      Disassembly of section .text:14# CHECK-EMPTY:15# CHECK-NEXT: <_foo>:16# CHECK-NEXT:    210120: nop17# CHECK-NEXT:    210124: nop18# CHECK-NEXT:    210128: nop19# CHECK-NEXT:    21012c: nop20# CHECK:      <_bar>:21# CHECK-NEXT:    210130: nop22# CHECK-NEXT:    210134: nop23# CHECK-NEXT:    210138: nop24# CHECK:      <_dah>:25# CHECK-NEXT:    21013c: nop26# CHECK-NEXT:    210140: nop27# CHECK:      <_start>:28# CHECK-NEXT:    210144: b.eq 0x210120 <_foo>29# CHECK-NEXT:    210148: b.eq 0x210130 <_bar>30# CHECK-NEXT:    21014c: b.eq 0x21013c <_dah>31 32#DSOREL:      Section {33#DSOREL:        Index:34#DSOREL:        Name: .got.plt35#DSOREL-NEXT:   Type: SHT_PROGBITS36#DSOREL-NEXT:   Flags [37#DSOREL-NEXT:     SHF_ALLOC38#DSOREL-NEXT:     SHF_WRITE39#DSOREL-NEXT:   ]40#DSOREL-NEXT:   Address: 0x3047041#DSOREL-NEXT:   Offset: 0x47042#DSOREL-NEXT:   Size: 4843#DSOREL-NEXT:   Link: 044#DSOREL-NEXT:   Info: 045#DSOREL-NEXT:   AddressAlignment: 846#DSOREL-NEXT:   EntrySize: 047#DSOREL-NEXT:  }48#DSOREL:      Relocations [49#DSOREL-NEXT:  Section ({{.*}}) .rela.plt {50#DSOREL-NEXT:    0x30488 R_AARCH64_JUMP_SLOT _foo51#DSOREL-NEXT:    0x30490 R_AARCH64_JUMP_SLOT _bar52#DSOREL-NEXT:    0x30498 R_AARCH64_JUMP_SLOT _dah53#DSOREL-NEXT:  }54#DSOREL-NEXT:]55 56#DSO:      Disassembly of section .text:57#DSO-EMPTY:58#DSO-NEXT: <_foo>:59#DSO-NEXT:     10338: nop60#DSO-NEXT:     1033c: nop61#DSO-NEXT:     10340: nop62#DSO-NEXT:     10344: nop63#DSO:      <_bar>:64#DSO-NEXT:     10348: nop65#DSO-NEXT:     1034c: nop66#DSO-NEXT:     10350: nop67#DSO:      <_dah>:68#DSO-NEXT:     10354: nop69#DSO-NEXT:     10358: nop70#DSO:      <_start>:71#DSO-NEXT:     1035c: b.eq 0x10390 <_foo@plt>72#DSO-NEXT:     10360: b.eq 0x103a0 <_bar@plt>73#DSO-NEXT:     10364: b.eq 0x103b0 <_dah@plt>74#DSO-EMPTY:75#DSO-NEXT: Disassembly of section .plt:76#DSO-EMPTY:77#DSO-NEXT: <.plt>:78#DSO-NEXT:     10370: stp x16, x30, [sp, #-16]!79#DSO-NEXT:     10374: adrp x16, 0x3000080#DSO-NEXT:     10378: ldr x17, [x16, #1152]81#DSO-NEXT:     1037c: add x16, x16, #115282#DSO-NEXT:     10380: br x1783#DSO-NEXT:     10384: nop84#DSO-NEXT:     10388: nop85#DSO-NEXT:     1038c: nop86#DSO-EMPTY:87#DSO-NEXT:   <_foo@plt>:88#DSO-NEXT:     10390: adrp x16, 0x3000089#DSO-NEXT:     10394: ldr x17, [x16, #1160]90#DSO-NEXT:     10398: add x16, x16, #116091#DSO-NEXT:     1039c: br x1792#DSO-EMPTY:93#DSO-NEXT:   <_bar@plt>:94#DSO-NEXT:     103a0: adrp x16, 0x3000095#DSO-NEXT:     103a4: ldr x17, [x16, #1168]96#DSO-NEXT:     103a8: add x16, x16, #116897#DSO-NEXT:     103ac: br x1798#DSO-EMPTY:99#DSO-NEXT:   <_dah@plt>:100#DSO-NEXT:     103b0: adrp x16, 0x30000101#DSO-NEXT:     103b4: ldr x17, [x16, #1176]102#DSO-NEXT:     103b8: add x16, x16, #1176103#DSO-NEXT:     103bc: br x17104 105.globl _start106_start:107 b.eq _foo108 b.eq _bar109 b.eq _dah110