llvm-project/lld/test/old-elf/Mips/r26-2-micro.test

32 lines
939 B
Plaintext

# REQUIRES: mips
# Check reading addendum for R_MICROMIPS_26_S1 relocation.
# RUN: llvm-mc -arch=mipsel -filetype=obj -mattr=micromips -o=%t.o %s
# RUN: lld -flavor old-gnu -target mipsel -o %t.exe %t.o
# RUN: llvm-objdump -d -mattr=micromips %t.exe | FileCheck %s
# CHECK: Disassembly of section .text:
# CHECK-NEXT: __start:
# CHECK-NEXT: 400180: 10 f0 60 70 jalx 2154688
# CHECK-NEXT: 400184: 00 00 00 00 nop
# CHECK-NEXT: 400188: 10 f0 68 70 jalx 2154704
# CHECK-NEXT: 40018c: 00 00 00 00 nop
# CHECK-NEXT: 400190: 10 f0 58 00 jalx 2097328
# CHECK-NEXT: 400194: 00 00 00 00 nop
# CHECK-NEXT: 400198: 10 f0 62 00 jalx 2097348
# CHECK-NEXT: 40019c: 00 00 00 00 nop
#
# CHECK: loc:
# CHECK-NEXT: 4001a0: 00 00 00 00 nop
.text
.globl __start
__start:
jal __start + 0x1C000
jal loc + 0x1C000
jal __start + 0x7ffffe2
jal loc + 0x7ffffea
loc:
nop