brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · ea510c0 Raw
52 lines · plain
1# REQUIRES: arm2# RUN: yaml2obj %s -o %t.o3# RUN: ld.lld %t.o -o %t4# RUN: llvm-objdump --no-print-imm-hex -d %t | FileCheck %s5 6# CHECK: Disassembly of section .text:7# CHECK-EMPTY:8# CHECK-NEXT: <_start>:9# CHECK-NEXT:    e7ff    b       0x200b6 <_start+0x2> @ imm = #-210# CHECK-NEXT:    d0fe    beq     0x200b6 <_start+0x2> @ imm = #-411 12# Test the R_ARM_THM_JUMP11 (102) and R_ARM_THM_JUMP8 (103) relocations to an13# undefined weak reference.  It should resolve to the next instruction, which14# is an offset of -2 which when added to the Thumb PC-bias of 4 is +2. We can't15# use llvm-mc to construct the object as it relaxes b.n to b.w (R_ARM_JUMP24).16 17!ELF18FileHeader:19  Class:           ELFCLASS3220  Data:            ELFDATA2LSB21  Type:            ET_REL22  Machine:         EM_ARM23Sections:24  - Type:            SHT_PROGBITS25    Name:            .text26    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]27    Content:         "fee7fed0"28  - Type:            SHT_REL29    Name:            .rel.text30    Link:            .symtab31    Info:            .text32    Relocations:33      - Symbol:          undefined_weak34        Type:            R_ARM_THM_JUMP1135      - Symbol:          undefined_weak36        Type:            R_ARM_THM_JUMP837 38Symbols:39  - Type:             STT_NOTYPE40    Name:             "$t"41    Section:          .text42    Value:            043  - Type:             STT_FUNC44    Name:             _start45    Value:            146    Section:          .text47    Binding:          STB_GLOBAL48  - Type:             STT_NOTYPE49    Name:             undefined_weak50    Value:            051    Binding:          STB_WEAK52