-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lld][LoongArch] Print error when encountering R_LARCH_ALIGN
GAS (from binutils 2.41) defaults to emit R_LARCH_ALIGN for the `.align` directive for later linker relaxation in `ld`. But `lld` hasn't unimplemented relaxation on LoongArch currently. So we print a more valuable error than the default when encountering `R_LARCH_ALIGN`. Similar to https://reviews.llvm.org/D71820.
- Loading branch information
1 parent
0219bd3
commit f03fd05
Showing
2 changed files
with
23 additions
and
0 deletions.
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,15 @@ | ||
# REQUIRES: loongarch | ||
|
||
# RUN: llvm-mc --filetype=obj --triple=loongarch64 %s -o %t.o | ||
# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s | ||
|
||
# CHECK: relocation R_LARCH_ALIGN requires unimplemented linker relaxation | ||
|
||
.global _start | ||
_start: | ||
addi.d $t0, $t0, 1 | ||
1: | ||
nop | ||
.reloc 1b, R_LARCH_ALIGN, 12 | ||
nop | ||
nop |