brintos

brintos / llvm-project-archived public Read only

0
0
Text · 858 B · 299f110 Raw
26 lines · plain
1## A label difference separated by an alignment directive, when the2## referenced symbols are in a non-executable section with instructions,3## should generate ADD/SUB relocations.4## https://github.com/llvm/llvm-project/pull/765525 6# RUN: llvm-mc --filetype=obj --triple=riscv64 --mattr=+relax %s \7# RUN:     | llvm-readobj -r - | FileCheck --check-prefixes=CHECK,RELAX %s8# RUN: llvm-mc --filetype=obj --triple=riscv64 --mattr=-relax %s \9# RUN:     | llvm-readobj -r - | FileCheck %s10 11.section ".dummy", "a"12.L1:13  call func14.p2align 315.L2:16.dword .L2 - .L117 18# CHECK:       Relocations [19# CHECK-NEXT:    Section ({{.*}}) .rela.dummy {20# CHECK-NEXT:      0x0 R_RISCV_CALL_PLT func 0x021# RELAX-NEXT:      0x0 R_RISCV_RELAX - 0x022# RELAX-NEXT:      0x8 R_RISCV_ADD64 .L2 0x023# RELAX-NEXT:      0x8 R_RISCV_SUB64 .L1 0x024# CHECK-NEXT:    }25# CHECK-NEXT:  ]26