48 lines · plain
1# REQUIRES: aarch642 3# RUN: yaml2obj %s -o %t.o4# RUN: ld.lld %t.o -o %t.out5# RUN: llvm-objdump -d --no-show-raw-insn %t.out | FileCheck %s6 7# Check that the R_AARCH64_JUMP26 writes the branch opcode as well as the8# immediate. We use this property to overwrite instructions with a branch.9 10# CHECK: Disassembly of section .text:11# CHECK-EMPTY:12# CHECK-NEXT: <foo>:13# CHECK-NEXT: 210120: b 0x21012414# CHECK: <bar>:15# CHECK-NEXT: 210124: b 0x21012016 17!ELF18FileHeader:19 Class: ELFCLASS6420 Data: ELFDATA2LSB21 Type: ET_REL22 Machine: EM_AARCH6423Sections:24 - Type: SHT_PROGBITS25 Name: .text26 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]27 Content: "0000000000000000"28 - Type: SHT_RELA29 Name: .rela.text30 Link: .symtab31 Info: .text32 Relocations:33 - Symbol: bar34 Type: R_AARCH64_JUMP2635 - Offset: 436 Symbol: foo37 Type: R_AARCH64_JUMP2638 39Symbols:40 - Type: STT_FUNC41 Section: .text42 Name: foo43 Value: 044 - Type: STT_FUNC45 Section: .text46 Name: bar47 Value: 448