-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LoongArch] Emit R_LARCH_64_PCREL relocation for FK_Data_8 when IsPCR…
…el is true Reviewed By: xen0n, MaskRay, hev Differential Revision: https://reviews.llvm.org/D153872
- Loading branch information
1 parent
02f94a6
commit 42cb3c6
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# RUN: llvm-mc --filetype=obj --triple=loongarch64 %s -o %t | ||
# RUN: llvm-readobj -r %t | FileCheck %s | ||
|
||
## Check that subtraction expressions emit R_LARCH_32_PCREL and R_LARCH_64_PCREL relocations. | ||
|
||
## TODO: 1- or 2-byte data relocations are not supported for now. | ||
|
||
# CHECK: Relocations [ | ||
# CHECK-NEXT: Section ({{.*}}) .rela.data { | ||
# CHECK-NEXT: 0x0 R_LARCH_64_PCREL sx 0x0 | ||
# CHECK-NEXT: 0x8 R_LARCH_64_PCREL sy 0x0 | ||
# CHECK-NEXT: 0x10 R_LARCH_32_PCREL sx 0x0 | ||
# CHECK-NEXT: 0x14 R_LARCH_32_PCREL sy 0x0 | ||
# CHECK-NEXT: } | ||
|
||
.section sx,"a" | ||
x: | ||
nop | ||
|
||
.data | ||
.8byte x-. | ||
.8byte y-. | ||
.4byte x-. | ||
.4byte y-. | ||
|
||
.section sy,"a" | ||
y: | ||
nop |