Skip to content

[lld][LoongArch] Relax call36/tail36: R_LARCH_CALL36 #123576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Mar 9, 2025
Merged

Conversation

ylzsx
Copy link
Contributor

@ylzsx ylzsx commented Jan 20, 2025

Instructions with relocation R_LARCH_CALL36 may be relax as follows:

From:
   pcaddu18i $dest, %call36(foo)
     R_LARCH_CALL36, R_LARCH_RELAX
   jirl $r, $dest, 0
To:
   b/bl foo  # bl if r=$ra, b if r=$zero
     R_LARCH_B26

ylzsx added 9 commits January 20, 2025 10:08
Support relaxation optimization for two types of code sequences.
```
From:
  pcalau12i $a0, %pc_hi20(sym)
    R_LARCH_PCALA_HI20, R_LARCH_RELAX
  addi.w/d $a0, $a0, %pc_lo12(sym)
    R_LARCH_PCALA_LO12, R_LARCH_RELAX
To:
  pcaddi $a0, %pc_lo12(sym)
    R_LARCH_PCREL20_S2

From:
  pcalau12i $a0, %got_pc_hi20(sym_got)
    R_LARCH_GOT_PC_HI20, R_LARCH_RELAX
  ld.w/d $a0, $a0, %got_pc_lo12(sym_got)
    R_LARCH_GOT_PC_LO12, R_LARCH_RELAX
To:
  pcaddi $a0, %got_pc_hi20(sym_got)
    R_LARCH_PCREL20_S2
```
Similar to aarch64-adrp-ldr-got-symbols.s.
Dependency on #123017
Instructions with relocation `R_LARCH_CALL36` may be relax as follows:
```
From:
  pcaddu18i $dest, %call36(foo)
    R_LARCH_CALL36, R_LARCH_RELAX
  jirl $r, $dest, 0
To:
  b/bl foo  # bl if r=$ra, b if r=$zero
    R_LARCH_B26
```
@llvmbot
Copy link
Member

llvmbot commented Jan 20, 2025

@llvm/pr-subscribers-backend-loongarch
@llvm/pr-subscribers-lld-elf

@llvm/pr-subscribers-lld

Author: Zhaoxin Yang (ylzsx)

Changes

Instructions with relocation R_LARCH_CALL36 may be relax as follows:

From:
   pcaddu18i $dest, %call36(foo)
     R_LARCH_CALL36, R_LARCH_RELAX
   jirl $r, $dest, 0
To:
   b/bl foo  # bl if r=$ra, b if r=$zero
     R_LARCH_B26

Full diff: https://github.com/llvm/llvm-project/pull/123576.diff

4 Files Affected:

  • (modified) lld/ELF/Arch/LoongArch.cpp (+41)
  • (added) lld/test/ELF/loongarch-relax-call36-2.s (+63)
  • (added) lld/test/ELF/loongarch-relax-call36.s (+135)
  • (added) lld/test/ELF/loongarch-relax-emit-relocs-2.s (+61)
diff --git a/lld/ELF/Arch/LoongArch.cpp b/lld/ELF/Arch/LoongArch.cpp
index b999e7fd27ae9d..0aa0cf5b657a0f 100644
--- a/lld/ELF/Arch/LoongArch.cpp
+++ b/lld/ELF/Arch/LoongArch.cpp
@@ -58,6 +58,8 @@ enum Op {
   LD_W = 0x28800000,
   LD_D = 0x28c00000,
   JIRL = 0x4c000000,
+  B = 0x50000000,
+  BL = 0x54000000,
 };
 
 enum Reg {
@@ -830,6 +832,37 @@ static void relaxPCHi20Lo12(Ctx &ctx, const InputSection &sec, size_t i,
   remove = 4;
 }
 
+// Relax code sequence.
+// From:
+//   pcaddu18i $ra, %call36(foo)
+//   jirl $ra, $ra, 0
+// To:
+//   b/bl foo
+static void relaxCall36(Ctx &ctx, const InputSection &sec, size_t i,
+                        uint64_t loc, Relocation &r, uint32_t &remove) {
+  const uint64_t symLocal =
+      (r.expr == R_PLT_PC ? r.sym->getPltVA(ctx) : r.sym->getVA(ctx)) +
+      r.addend;
+
+  const int64_t distance = symLocal - loc;
+  // Check if the distance aligns 4 bytes or exceeds the range of b[l].
+  if ((distance & 0x3) != 0 || !isInt<28>(distance))
+    return;
+
+  const uint32_t nextInsn = read32le(sec.content().data() + r.offset + 4);
+  if (getD5(nextInsn) == R_RA) {
+    // convert jirl to bl
+    sec.relaxAux->relocTypes[i] = R_LARCH_B26;
+    sec.relaxAux->writes.push_back(insn(BL, 0, 0, 0));
+    remove = 4;
+  } else if (getD5(nextInsn) == R_ZERO) {
+    // convert jirl to b
+    sec.relaxAux->relocTypes[i] = R_LARCH_B26;
+    sec.relaxAux->writes.push_back(insn(B, 0, 0, 0));
+    remove = 4;
+  }
+}
+
 static bool relax(Ctx &ctx, InputSection &sec) {
   const uint64_t secAddr = sec.getVA();
   const MutableArrayRef<Relocation> relocs = sec.relocs();
@@ -874,6 +907,10 @@ static bool relax(Ctx &ctx, InputSection &sec) {
       if (isPairRelaxable(relocs, i))
         relaxPCHi20Lo12(ctx, sec, i, loc, r, relocs[i + 2], remove);
       break;
+    case R_LARCH_CALL36:
+      if (relaxable(relocs, i))
+        relaxCall36(ctx, sec, i, loc, r, remove);
+      break;
     }
 
     // For all anchors whose offsets are <= r.offset, they are preceded by
@@ -977,6 +1014,10 @@ void LoongArch::finalizeRelax(int passes) const {
             // RelExpr is needed for relocating.
             r.expr = r.sym->hasFlag(NEEDS_PLT) ? R_PLT_PC : R_PC;
             break;
+          case R_LARCH_B26:
+            skip = 4;
+            write32le(p, aux.writes[writesIdx++]);
+            break;
           default:
             llvm_unreachable("unsupported type");
           }
diff --git a/lld/test/ELF/loongarch-relax-call36-2.s b/lld/test/ELF/loongarch-relax-call36-2.s
new file mode 100644
index 00000000000000..71650aefe94321
--- /dev/null
+++ b/lld/test/ELF/loongarch-relax-call36-2.s
@@ -0,0 +1,63 @@
+# REQUIRES: loongarch
+# RUN: rm -rf %t && split-file %s %t && cd %t
+# RUN: llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
+
+# RUN: ld.lld --relax -T lds a.o -o a
+# RUN: llvm-objdump -d --no-show-raw-insn a | FileCheck %s --check-prefixes=RELAX,RELAX-MID
+
+## Unsure whether this needs a diagnostic. GNU ld allows this.
+# RUN: ld.lld --relax -T lds -pie a.o -o a.pie
+# RUN: llvm-objdump -d --no-show-raw-insn a.pie | FileCheck %s --check-prefixes=RELAX,RELAX-MID
+
+# RUN: ld.lld --relax -T lds -pie -z notext -z ifunc-noplt a.o -o a.ifunc-noplt
+# RUN: llvm-objdump -d --no-show-raw-insn a.ifunc-noplt | FileCheck %s --check-prefixes=RELAX,NORELAX-MID
+
+# RELAX-LABEL:  <_start>:
+## offset = 0x10000000 - 0x8000000 = 0x8000000(134217728), hi=512, lo18=0
+# RELAX-NEXT:    8000000:  pcaddu18i $ra, 512
+# RELAX-NEXT:              jirl   $ra, $ra, 0
+# RELAX-NEXT:              bl     134217720
+# RELAX-NEXT:              bl     -134217728
+## offset = 12 - 0x8000010 = -0x8000004(-134217732), hi=512, lo18=-4
+# RELAX-NEXT:    8000010:  pcaddu18i $ra, -512
+# RELAX-NEXT:              jirl   $ra, $ra, -4
+# RELAX-EMPTY:
+
+# RELAX-MID-LABEL:  <.mid>:
+## offset = 0x8010000 - 0x8008000 = 32768
+# RELAX-MID-NEXT:    8008000:  bl     32768
+# RELAX-MID-NEXT:              b      32764
+# RELAX-MID-EMPTY:
+
+# NORELAX-MID-LABEL: <.mid>:
+# NORELAX-MID-NEXT:  8008000:  pcaddu18i $ra, 0
+# NORELAX-MID-NEXT:            jirl   $ra, $ra, 0
+# NORELAX-MID-NEXT:            pcaddu18i $t0, 0
+# NORELAX-MID-NEXT:            jr     $t0
+# NORELAX-MID-EMPTY:
+
+#--- a.s
+.global _start, ifunc
+_start:
+  call36 pos       # exceed positive range (.text+0x7fffffc), not relaxed
+  call36 pos       # relaxed
+  call36 neg       # relaxed
+  call36 neg       # exceed negative range (.text+16-0x8000000), not relaxed
+
+.section .mid,"ax",@progbits
+.balign 16
+  call36 ifunc@plt      # enable ifunc, not relaxed
+  tail36 $t0, ifunc@plt # enable ifunc, not relaxed
+
+.type ifunc, @gnu_indirect_function
+ifunc:
+  ret
+
+#--- lds
+SECTIONS {
+  .text 0x8000000 : { *(.text) }
+  .mid  0x8008000 : { *(.mid) }
+  .iplt 0x8010000 : { *(.iplt) }
+}
+neg = 12;
+pos = 0x10000000;
diff --git a/lld/test/ELF/loongarch-relax-call36.s b/lld/test/ELF/loongarch-relax-call36.s
new file mode 100644
index 00000000000000..bda0c4f05da91c
--- /dev/null
+++ b/lld/test/ELF/loongarch-relax-call36.s
@@ -0,0 +1,135 @@
+# REQUIRES: loongarch
+
+# RUN: rm -rf %t && split-file %s %t && cd %t
+
+# RUN: llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
+# RUN: llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax b.s -o b.64.o
+# RUN: ld.lld --relax -shared -soname=b.so b.64.o -o b.64.so
+# RUN: ld.lld --relax -T lds a.64.o b.64.so -o 64
+# RUN: llvm-objdump -td --no-show-raw-insn 64 | FileCheck %s --check-prefix=RELAX
+
+## --no-relax disables relaxation.
+# RUN: ld.lld --no-relax -T lds a.64.o b.64.so -o 64.norelax
+# RUN: llvm-objdump -td --no-show-raw-insn 64.norelax | FileCheck %s --check-prefix=NORELAX
+
+# RELAX:       {{0*}}00010000 g       .text  {{0*}}0000001c _start
+# RELAX:       {{0*}}0001001c g       .text  {{0*}}00000000 _start_end
+# RELAX:       {{0*}}00010808 g       .mid   {{0*}}00000000 mid_end
+# RELAX:       {{0*}}10010010 g       .high  {{0*}}00000000 high_end
+
+# RELAX-LABEL: <_start>:
+## offset = 0x10018 - 0x10000 = 24
+# RELAX-NEXT:      10000:  bl     24 <a>
+# RELAX-NEXT:              b      20 <a>
+# RELAX-NEXT:              nop
+# RELAX-NEXT:              nop
+## offset = .plt(0x10400)+32 - 0x10010 = 1040
+# RELAX-NEXT:      10010:  bl     1040 <bar+0x10420>
+# RELAX-NEXT:              b      1036 <bar+0x10420>
+# RELAX-EMPTY:
+# RELAX-NEXT: <a>:
+# RELAX-NEXT:      10018:  ret
+# RELAX-EMPTY:
+
+# RELAX-LABEL: <.mid>:
+## offset = 0x10000 - 0x10800 = -2048
+# RELAX-NEXT:      10800:  bl     -2048 <_start>
+# RELAX-NEXT:              b      -2052 <_start>
+# RELAX-EMPTY:
+
+# RELAX-LABEL: <.mid2>:
+## offset = 0x10000 - 0x1010000 = -16777216
+# RELAX-NEXT:    1010000:  bl     -16777216 <_start>
+# RELAX-NEXT:              b      -16777220 <_start>
+# RELAX-EMPTY:
+
+# RELAX-LABEL: <.high>:
+## offset = 0x10000 - 0x10010000 = -0x10000000, hi=-1024, lo18=0
+# RELAX-NEXT:   10010000:  pcaddu18i $ra, -1024
+# RELAX-NEXT:              jirl   $ra, $ra, 0
+# RELAX-NEXT:              pcaddu18i $t0, -1024
+# RELAX-NEXT:              jirl   $zero, $t0, -8
+# RELAX-EMPTY:
+
+
+# NORELAX-LABEL: <_start>:
+## offset = 0x10020 - 0x10000 = 0x20, hi=0, lo18=32
+# NORELAX-NEXT:    10000:  pcaddu18i $ra, 0
+# NORELAX-NEXT:            jirl   $ra, $ra, 32
+## offset = 0x10020 - 0x10008 = 0x18, hi=0, lo18=24
+# NORELAX-NEXT:    10008:  pcaddu18i $t0, 0
+# NORELAX-NEXT:            jirl   $zero, $t0, 24
+## offset = .plt(0x10400)+32 - 0x10010 = 0x410, hi=0, lo18=1040
+# NORELAX-NEXT:    10010:  pcaddu18i $ra, 0
+# NORELAX-NEXT:            jirl   $ra, $ra, 1040
+## offset = .plt(0x10400)+32 - 0x10018 = 0x408, hi=0, lo18=1032
+# NORELAX-NEXT:    10018:  pcaddu18i $t0, 0
+# NORELAX-NEXT:            jirl   $zero, $t0, 1032
+# NORELAX-EMPTY:
+# NORELAX-NEXT: <a>:
+# NORELAX-NEXT:      10020:  ret
+# NORELAX-EMPTY:
+
+# NORELAX-LABEL: <.mid>:
+## offset = 0x10000 - 0x10800 = -0x800, hi=0, lo18=-2048
+# NORELAX-NEXT:    10800:  pcaddu18i $ra, 0
+# NORELAX-NEXT:            jirl   $ra, $ra, -2048
+# NORELAX-NEXT:            pcaddu18i $t0, 0
+# NORELAX-NEXT:            jirl   $zero, $t0, -2056
+# NORELAX-EMPTY:
+
+# NORELAX-LABEL: <.mid2>:
+## offset = 0x10000 - 0x1010000 = -0x1000000, hi=-64, lo18=0
+# NORELAX-NEXT:  1010000:  pcaddu18i $ra, -64
+# NORELAX-NEXT:            jirl   $ra, $ra, 0
+# NORELAX-NEXT:            pcaddu18i $t0, -64
+# NORELAX-NEXT:            jirl   $zero, $t0, -8
+# NORELAX-EMPTY:
+
+# NORELAX-LABEL: <.high>:
+## offset = 0x10000 - 0x10010000 = -0x10000000, hi=-1024, lo18=0
+# NORELAX-NEXT: 10010000:  pcaddu18i $ra, -1024
+# NORELAX-NEXT:            jirl   $ra, $ra, 0
+# NORELAX-NEXT:            pcaddu18i $t0, -1024
+# NORELAX-NEXT:            jirl   $zero, $t0, -8
+# NORELAX-EMPTY:
+
+#--- a.s
+.global _start, _start_end
+_start:
+  call36 a          # relaxed. la64: bl
+  tail36 $t0, a@plt # relaxed. la64: b
+.balign 16
+  call36 bar        # PLT call36 can be relaxed. la64: bl
+  tail36 $t0, bar   # PLT tail36 can be relaxed. la64: bl
+
+a:
+  ret
+.size _start, . - _start
+_start_end:
+
+.section .mid,"ax",@progbits
+  call36 _start@plt         # relaxed. la64: bl
+  tail36 $t0, _start@plt    # relaxed. la64: b
+
+.section .mid2,"ax",@progbits
+  call36 _start@plt         # relaxed. la64: bl
+  tail36 $t0, _start@plt    # relaxed. la64: b
+
+.section .high,"ax",@progbits
+  call36 _start@plt         # exceed range, not relaxed
+  tail36 $t0,_start@plt     # exceed range, not relaxed
+
+#--- b.s
+.globl bar
+bar:
+  ret
+
+#--- lds
+SECTIONS {
+  .text 0x10000 : { *(.text) }
+  .plt 0x10400 : { *(.plt) }
+  .mid 0x10800 : { *(.mid); mid_end = .; }
+  .mid2 0x1010000 : { *(.mid2) }
+  .high 0x10010000 : { *(.high); high_end = .; }
+}
diff --git a/lld/test/ELF/loongarch-relax-emit-relocs-2.s b/lld/test/ELF/loongarch-relax-emit-relocs-2.s
new file mode 100644
index 00000000000000..eddfc46b1ad086
--- /dev/null
+++ b/lld/test/ELF/loongarch-relax-emit-relocs-2.s
@@ -0,0 +1,61 @@
+# REQUIRES: loongarch
+## Test that we can handle --emit-relocs while relaxing.
+## Call36 and tail36 need LA64 basic integer, so they donot have 32-bit version.
+
+# RUN: llvm-mc --filetype=obj --triple=loongarch64 --mattr=+relax %s -o %t.64.o
+# RUN: ld.lld --relax -Ttext=0x10000 --emit-relocs %t.64.o -o %t.64
+# RUN: llvm-objdump -dr %t.64 | FileCheck %s --check-prefix=RELAX
+
+## -r should keep original relocations.
+# RUN: ld.lld --relax -r %t.64.o -o %t.64.r
+# RUN: llvm-objdump -dr %t.64.r | FileCheck %s --check-prefix=CHECKR
+
+## --no-relax should keep original relocations.
+# RUN: ld.lld --no-relax -Ttext=0x10000 --emit-relocs %t.64.o -o %t.64.norelax
+# RUN: llvm-objdump -dr %t.64.norelax | FileCheck %s --check-prefix=NORELAX
+
+# RELAX:      00010000 <_start>:
+# RELAX-NEXT:   bl  0
+# RELAX-NEXT:     R_LARCH_B26 _start
+# RELAX-NEXT:     R_LARCH_RELAX *ABS*
+# RELAX-NEXT:   b   -4
+# RELAX-NEXT:     R_LARCH_B26 _start
+# RELAX-NEXT:     R_LARCH_RELAX *ABS*
+# RELAX-NEXT:   nop
+# RELAX-NEXT:     R_LARCH_ALIGN *ABS*+0xc
+# RELAX-NEXT:   nop
+# RELAX-NEXT:   ret
+
+# CHECKR:      <_start>:
+# CHECKR-NEXT:   pcaddu18i $ra, 0
+# CHECKR-NEXT:     R_LARCH_CALL36 _start
+# CHECKR-NEXT:     R_LARCH_RELAX *ABS*
+# CHECKR-NEXT:   jirl   $ra, $ra, 0
+# CHECKR-NEXT:   pcaddu18i $t0, 0
+# CHECKR-NEXT:     R_LARCH_CALL36 _start
+# CHECKR-NEXT:     R_LARCH_RELAX *ABS*
+# CHECKR-NEXT:   jr     $t0
+# CHECKR-NEXT:   nop
+# CHECKR-NEXT:     R_LARCH_ALIGN *ABS*+0xc
+# CHECKR-NEXT:   nop
+# CHECKR-NEXT:   nop
+# CHECKR-NEXT:   ret
+
+# NORELAX:      <_start>:
+# NORELAX-NEXT:   pcaddu18i $ra, 0
+# NORELAX-NEXT:     R_LARCH_CALL36 _start
+# NORELAX-NEXT:     R_LARCH_RELAX *ABS*
+# NORELAX-NEXT:   jirl   $ra, $ra, 0
+# NORELAX-NEXT:   pcaddu18i $t0, 0
+# NORELAX-NEXT:     R_LARCH_CALL36 _start
+# NORELAX-NEXT:     R_LARCH_RELAX *ABS*
+# NORELAX-NEXT:   jirl $zero, $t0, -8
+# NORELAX-NEXT:   ret
+# NORELAX-NEXT:     R_LARCH_ALIGN *ABS*+0xc
+
+.global _start
+_start:
+  call36 _start
+  tail36 $t0, _start
+  .p2align 4
+  ret

Copy link
Contributor

@SixWeining SixWeining left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Base automatically changed from users/ylzsx/r-pchi20lo12 to main February 15, 2025 01:19
@MaskRay
Copy link
Member

MaskRay commented Feb 15, 2025

@xen0n May I ask you to double check the code? It seems good and appears to be LGTMed by a colleague of the author.

Copy link
Contributor

@xen0n xen0n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for implementing this! (You're also free to refer to #127312 and scavenge whatever useful.)

if ((displace & 0x3) != 0 || !isInt<28>(displace))
return;

const uint32_t nextInsn = read32le(sec.content().data() + r.offset + 4);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To match ld.bfd behavior we should check isJirl(nextInsn) before continuing. In #127312 (comment) I commented that we should probably add stronger checks for ld.bfd too, but let's make the current behavior aligned at first.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is not necessary. Here are the reasons:

  1. Existing compilers, whether GCC or Clang, always generate the correct instruction sequence corresponding to the R_LARCH_CALL36 relocation when it is produced.
  2. For handwritten assembly, correct use of pseudo-instructions will not lead to errors. For maliciously written incorrect assembly cases, we do not need to ensure their correctness, as such erroneous cases can always be constructed in most architectures.
  3. Instruction checking should be avoided as much as possible in lld. (https://github.com/llvm/llvm-project/pull/127312/files#r1957198091)

It would be greatly appreciated if you could provide an example of an illegal case or present more substantial reasons.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is not necessary. Here are the reasons:

1. Existing compilers, whether GCC or Clang, always generate the correct instruction sequence corresponding to the R_LARCH_CALL36 relocation when it is produced.

2. For handwritten assembly, correct use of pseudo-instructions will not lead to errors. For maliciously written incorrect assembly cases, we do not need to ensure their correctness, as such erroneous cases can always be constructed in most architectures.

3. Instruction checking should be avoided as much as possible in lld. (https://github.com/llvm/llvm-project/pull/127312/files#r1957198091)

It would be greatly appreciated if you could provide an example of an illegal case or present more substantial reasons.

I think it's probably okay to not add more checks, but for ld.bfd interoperability the check on jirl is necessary. If you think this should not be done either, the ld.bfd implementation likely needs change as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After further consideration and revisiting the manual again(https://github.com/loongson/la-abi-specs/blob/release/laelf.adoc),
image
the generated pcaddu18i and jirl by GCC and Clang must be adjacent.

As for the interoperability you mentioned, lld handles instruction sequences generated by gas. And gas should not generate non-contiguous instruction sequences either. Therefore, we think that adding a check in lld is unnecessary.

Additionally, if jirl check is added here, other relaxations (such as R_LARCH_{PCALA,GOT_PC}_{HI20,LO12}, etc) would also need to check the instructions, which contradicts the principle of avoiding instruction checks unless absolutely necessary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After further consideration and revisiting the manual again(https://github.com/loongson/la-abi-specs/blob/release/laelf.adoc), the generated pcaddu18i and jirl by GCC and Clang must be adjacent.

As for the interoperability you mentioned, lld handles instruction sequences generated by gas. And gas should not generate non-contiguous instruction sequences either. Therefore, we think that adding a check in lld is unnecessary.

Additionally, if jirl check is added here, other relaxations (such as R_LARCH_{PCALA,GOT_PC}_{HI20,LO12}, etc) would also need to check the instructions, which contradicts the principle of avoiding instruction checks unless absolutely necessary.

I'm not objecting to the current revision per se, but rather behavior consistency, no matter whether the input is well-formed or not -- the so-called "bug-for-bug compatibility". This means:

  • either we add a check for jirl here in LLD and exactly replicate ld.bfd behavior, or
  • we leave the code as-is, and remove the check at ld.bfd side, with your comment here as justification,

so eventually we're going to have 2 consistent implementations of LoongArch ELF psABI and happy users. What do you think here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed with developers of ld's loongarch port, but they think the check is necessary in ld and lld don't need to align with it.

How about adding an assertion here as a compromise?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I have added an assertion to check jirl. 52bec2b

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply -- I didn't realize "assertion" is just assert before.

But now debug builds of lld will error out on malformed R_LARCH_CALL36 underlying data -- this doesn't align with ld.bfd either because it will simply skip relaxing this piece instead of dying, so I fear the assertion may do more harm than good 🤷

Copy link
Contributor Author

@ylzsx ylzsx Mar 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed with developers of ld's loongarch port, but they think the check is necessary in ld and lld don't need to align with it.

@MaskRay Would you agree to adding a check for jirl in this situation?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still prefer that we remove the checks. We should avoid assert, when it is actually reachable.

If BFD wants to be guard against malformed input, that's ok. It's fine to diverge from it.

if ((displace & 0x3) != 0 || !isInt<28>(displace))
return;

const uint32_t nextInsn = read32le(sec.content().data() + r.offset + 4);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that those checks in ld are necessary. Let's file a bug in ld.

Copy link
Member

@MaskRay MaskRay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

Copy link
Contributor

@SixWeining SixWeining left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and I suggest to merge it now so that to unblock other PRs of this series.

@ylzsx ylzsx merged commit 6fbe491 into main Mar 9, 2025
11 checks passed
@ylzsx ylzsx deleted the users/ylzsx/r-call36 branch March 9, 2025 09:21
@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 9, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-gcc-ubuntu running on sie-linux-worker3 while building lld at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/14220

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lld :: ELF/loongarch-relax-call36.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && split-file /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && cd /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ rm -rf /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ split-file /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ cd /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
RUN: at line 6: /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
a.s:4:17: error: invalid variant 'plt'
  tail36 $t0, a@plt # relaxed. la64: b
                ^
a.s:15:17: error: invalid variant 'plt'
  call36 _start@plt         # relaxed. la64: bl
                ^
a.s:16:22: error: invalid variant 'plt'
  tail36 $t0, _start@plt    # relaxed. la64: b
                     ^
a.s:19:17: error: invalid variant 'plt'
  call36 _start@plt         # relaxed. la64: bl
                ^
a.s:20:22: error: invalid variant 'plt'
  tail36 $t0, _start@plt    # relaxed. la64: b
                     ^
a.s:23:17: error: invalid variant 'plt'
  call36 _start@plt         # exceed range, not relaxed
                ^
a.s:24:21: error: invalid variant 'plt'
  tail36 $t0,_start@plt     # exceed range, not relaxed
                    ^

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 9, 2025

LLVM Buildbot has detected a new failure on builder premerge-monolithic-linux running on premerge-linux-1 while building lld at step 7 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/25151

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lld :: ELF/loongarch-relax-call36-2.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /build/buildbot/premerge-monolithic-linux/build/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && split-file /build/buildbot/premerge-monolithic-linux/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /build/buildbot/premerge-monolithic-linux/build/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && cd /build/buildbot/premerge-monolithic-linux/build/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ rm -rf /build/buildbot/premerge-monolithic-linux/build/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ split-file /build/buildbot/premerge-monolithic-linux/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /build/buildbot/premerge-monolithic-linux/build/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ cd /build/buildbot/premerge-monolithic-linux/build/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
RUN: at line 5: /build/buildbot/premerge-monolithic-linux/build/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
+ /build/buildbot/premerge-monolithic-linux/build/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
a.s:10:16: error: invalid variant 'plt'
  call36 ifunc@plt      # enable ifunc, not relaxed
               ^
a.s:11:21: error: invalid variant 'plt'
  tail36 $t0, ifunc@plt # enable ifunc, not relaxed
                    ^

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 9, 2025

LLVM Buildbot has detected a new failure on builder llvm-x86_64-debian-dylib running on gribozavr4 while building lld at step 8 "test-build-unified-tree-check-lld".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/21517

Here is the relevant piece of the build log for the reference
Step 8 (test-build-unified-tree-check-lld) failure: test (failure)
******************** TEST 'lld :: ELF/loongarch-relax-call36.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && split-file /b/1/llvm-x86_64-debian-dylib/llvm-project/lld/test/ELF/loongarch-relax-call36.s /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && cd /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ rm -rf /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ split-file /b/1/llvm-x86_64-debian-dylib/llvm-project/lld/test/ELF/loongarch-relax-call36.s /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ cd /b/1/llvm-x86_64-debian-dylib/build/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
RUN: at line 6: /b/1/llvm-x86_64-debian-dylib/build/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
+ /b/1/llvm-x86_64-debian-dylib/build/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
a.s:4:17: error: invalid variant 'plt'
  tail36 $t0, a@plt # relaxed. la64: b
                ^
a.s:15:17: error: invalid variant 'plt'
  call36 _start@plt         # relaxed. la64: bl
                ^
a.s:16:22: error: invalid variant 'plt'
  tail36 $t0, _start@plt    # relaxed. la64: b
                     ^
a.s:19:17: error: invalid variant 'plt'
  call36 _start@plt         # relaxed. la64: bl
                ^
a.s:20:22: error: invalid variant 'plt'
  tail36 $t0, _start@plt    # relaxed. la64: b
                     ^
a.s:23:17: error: invalid variant 'plt'
  call36 _start@plt         # exceed range, not relaxed
                ^
a.s:24:21: error: invalid variant 'plt'
  tail36 $t0,_start@plt     # exceed range, not relaxed
                    ^

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 9, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-bootstrap-hwasan running on sanitizer-buildbot11 while building lld at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/55/builds/8152

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86979 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36.s (85512 of 86979)
******************** TEST 'lld :: ELF/loongarch-relax-call36.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && split-file /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && cd /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ split-file /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ cd /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
RUN: at line 6: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
a.s:4:17: error: invalid variant 'plt'
  tail36 $t0, a@plt # relaxed. la64: b
                ^
a.s:15:17: error: invalid variant 'plt'
  call36 _start@plt         # relaxed. la64: bl
                ^
a.s:16:22: error: invalid variant 'plt'
  tail36 $t0, _start@plt    # relaxed. la64: b
                     ^
a.s:19:17: error: invalid variant 'plt'
  call36 _start@plt         # relaxed. la64: bl
                ^
a.s:20:22: error: invalid variant 'plt'
  tail36 $t0, _start@plt    # relaxed. la64: b
                     ^
a.s:23:17: error: invalid variant 'plt'
  call36 _start@plt         # exceed range, not relaxed
                ^
a.s:24:21: error: invalid variant 'plt'
  tail36 $t0,_start@plt     # exceed range, not relaxed
                    ^

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36-2.s (85513 of 86979)
Step 11 (stage2/hwasan check) failure: stage2/hwasan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86979 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36.s (85512 of 86979)
******************** TEST 'lld :: ELF/loongarch-relax-call36.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && split-file /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && cd /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ split-file /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ cd /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
RUN: at line 6: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
a.s:4:17: error: invalid variant 'plt'
  tail36 $t0, a@plt # relaxed. la64: b
                ^
a.s:15:17: error: invalid variant 'plt'
  call36 _start@plt         # relaxed. la64: bl
                ^
a.s:16:22: error: invalid variant 'plt'
  tail36 $t0, _start@plt    # relaxed. la64: b
                     ^
a.s:19:17: error: invalid variant 'plt'
  call36 _start@plt         # relaxed. la64: bl
                ^
a.s:20:22: error: invalid variant 'plt'
  tail36 $t0, _start@plt    # relaxed. la64: b
                     ^
a.s:23:17: error: invalid variant 'plt'
  call36 _start@plt         # exceed range, not relaxed
                ^
a.s:24:21: error: invalid variant 'plt'
  tail36 $t0,_start@plt     # exceed range, not relaxed
                    ^

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36-2.s (85513 of 86979)
Step 14 (stage3/hwasan check) failure: stage3/hwasan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 84047 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36-2.s (82580 of 84047)
******************** TEST 'lld :: ELF/loongarch-relax-call36-2.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && split-file /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && cd /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ split-file /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ cd /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
RUN: at line 5: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
a.s:10:16: error: invalid variant 'plt'
  call36 ifunc@plt      # enable ifunc, not relaxed
               ^
a.s:11:21: error: invalid variant 'plt'
  tail36 $t0, ifunc@plt # enable ifunc, not relaxed
                    ^

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36.s (82584 of 84047)
******************** TEST 'lld :: ELF/loongarch-relax-call36.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && split-file /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && cd /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ split-file /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ cd /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
RUN: at line 6: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
a.s:4:17: error: invalid variant 'plt'
  tail36 $t0, a@plt # relaxed. la64: b
                ^
a.s:15:17: error: invalid variant 'plt'

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 9, 2025

LLVM Buildbot has detected a new failure on builder clang-aarch64-sve2-vla running on linaro-g4-02 while building lld at step 7 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/198/builds/2672

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'lld :: ELF/loongarch-relax-call36.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && split-file /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/llvm/lld/test/ELF/loongarch-relax-call36.s /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && cd /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ rm -rf /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ split-file /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/llvm/lld/test/ELF/loongarch-relax-call36.s /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ cd /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
RUN: at line 6: /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
+ /home/tcwg-buildbot/worker/clang-aarch64-sve2-vla/stage1/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
a.s:4:17: error: invalid variant 'plt'
  tail36 $t0, a@plt # relaxed. la64: b
                ^
a.s:15:17: error: invalid variant 'plt'
  call36 _start@plt         # relaxed. la64: bl
                ^
a.s:16:22: error: invalid variant 'plt'
  tail36 $t0, _start@plt    # relaxed. la64: b
                     ^
a.s:19:17: error: invalid variant 'plt'
  call36 _start@plt         # relaxed. la64: bl
                ^
a.s:20:22: error: invalid variant 'plt'
  tail36 $t0, _start@plt    # relaxed. la64: b
                     ^
a.s:23:17: error: invalid variant 'plt'
  call36 _start@plt         # exceed range, not relaxed
                ^
a.s:24:21: error: invalid variant 'plt'
  tail36 $t0,_start@plt     # exceed range, not relaxed
                    ^

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 9, 2025

LLVM Buildbot has detected a new failure on builder clang-aarch64-sve-vls running on linaro-g3-04 while building lld at step 7 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/143/builds/6038

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'lld :: ELF/loongarch-relax-call36-2.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && split-file /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/llvm/lld/test/ELF/loongarch-relax-call36-2.s /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && cd /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ rm -rf /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ split-file /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/llvm/lld/test/ELF/loongarch-relax-call36-2.s /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ cd /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
RUN: at line 5: /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
+ /home/tcwg-buildbot/worker/clang-aarch64-sve-vls/stage1/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
a.s:10:16: error: invalid variant 'plt'
  call36 ifunc@plt      # enable ifunc, not relaxed
               ^
a.s:11:21: error: invalid variant 'plt'
  tail36 $t0, ifunc@plt # enable ifunc, not relaxed
                    ^

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 9, 2025

LLVM Buildbot has detected a new failure on builder premerge-monolithic-windows running on premerge-windows-1 while building lld at step 8 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/35/builds/8004

Here is the relevant piece of the build log for the reference
Step 8 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lld :: ELF/loongarch-relax-call36.s' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 4
rm -rf C:\ws\buildbot\premerge-monolithic-windows\build\tools\lld\test\ELF\Output\loongarch-relax-call36.s.tmp && split-file C:\ws\buildbot\premerge-monolithic-windows\llvm-project\lld\test\ELF\loongarch-relax-call36.s C:\ws\buildbot\premerge-monolithic-windows\build\tools\lld\test\ELF\Output\loongarch-relax-call36.s.tmp && cd C:\ws\buildbot\premerge-monolithic-windows\build\tools\lld\test\ELF\Output\loongarch-relax-call36.s.tmp
# executed command: rm -rf 'C:\ws\buildbot\premerge-monolithic-windows\build\tools\lld\test\ELF\Output\loongarch-relax-call36.s.tmp'
# executed command: split-file 'C:\ws\buildbot\premerge-monolithic-windows\llvm-project\lld\test\ELF\loongarch-relax-call36.s' 'C:\ws\buildbot\premerge-monolithic-windows\build\tools\lld\test\ELF\Output\loongarch-relax-call36.s.tmp'
# executed command: cd 'C:\ws\buildbot\premerge-monolithic-windows\build\tools\lld\test\ELF\Output\loongarch-relax-call36.s.tmp'
# RUN: at line 6
c:\ws\buildbot\premerge-monolithic-windows\build\bin\llvm-mc.exe -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
# executed command: 'c:\ws\buildbot\premerge-monolithic-windows\build\bin\llvm-mc.exe' -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
# .---command stderr------------
# | a.s:4:17: error: invalid variant 'plt'
# |   tail36 $t0, a@plt # relaxed. la64: b
# |                 ^
# | a.s:15:17: error: invalid variant 'plt'
# |   call36 _start@plt         # relaxed. la64: bl
# |                 ^
# | a.s:16:22: error: invalid variant 'plt'
# |   tail36 $t0, _start@plt    # relaxed. la64: b
# |                      ^
# | a.s:19:17: error: invalid variant 'plt'
# |   call36 _start@plt         # relaxed. la64: bl
# |                 ^
# | a.s:20:22: error: invalid variant 'plt'
# |   tail36 $t0, _start@plt    # relaxed. la64: b
# |                      ^
# | a.s:23:17: error: invalid variant 'plt'
# |   call36 _start@plt         # exceed range, not relaxed
# |                 ^
# | a.s:24:21: error: invalid variant 'plt'
# |   tail36 $t0,_start@plt     # exceed range, not relaxed
# |                     ^
# `-----------------------------
# error: command failed with exit status: 1

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 9, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-bootstrap-asan running on sanitizer-buildbot7 while building lld at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/24/builds/6124

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86980 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36-2.s (85504 of 86980)
******************** TEST 'lld :: ELF/loongarch-relax-call36-2.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && split-file /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && cd /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ split-file /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ cd /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
RUN: at line 5: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
a.s:10:16: error: invalid variant 'plt'
  call36 ifunc@plt      # enable ifunc, not relaxed
               ^
a.s:11:21: error: invalid variant 'plt'
  tail36 $t0, ifunc@plt # enable ifunc, not relaxed
                    ^

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36.s (85514 of 86980)
******************** TEST 'lld :: ELF/loongarch-relax-call36.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && split-file /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && cd /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ split-file /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ cd /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
RUN: at line 6: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
a.s:4:17: error: invalid variant 'plt'
  tail36 $t0, a@plt # relaxed. la64: b
                ^
a.s:15:17: error: invalid variant 'plt'
Step 11 (stage2/asan check) failure: stage2/asan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86980 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36-2.s (85504 of 86980)
******************** TEST 'lld :: ELF/loongarch-relax-call36-2.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && split-file /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && cd /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ split-file /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ cd /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
RUN: at line 5: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
a.s:10:16: error: invalid variant 'plt'
  call36 ifunc@plt      # enable ifunc, not relaxed
               ^
a.s:11:21: error: invalid variant 'plt'
  tail36 $t0, ifunc@plt # enable ifunc, not relaxed
                    ^

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36.s (85514 of 86980)
******************** TEST 'lld :: ELF/loongarch-relax-call36.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && split-file /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && cd /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ split-file /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ cd /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
RUN: at line 6: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
a.s:4:17: error: invalid variant 'plt'
  tail36 $t0, a@plt # relaxed. la64: b
                ^
a.s:15:17: error: invalid variant 'plt'
Step 14 (stage3/asan check) failure: stage3/asan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 84047 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36-2.s (82578 of 84047)
******************** TEST 'lld :: ELF/loongarch-relax-call36-2.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && split-file /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && cd /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ split-file /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ cd /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
RUN: at line 5: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
a.s:10:16: error: invalid variant 'plt'
  call36 ifunc@plt      # enable ifunc, not relaxed
               ^
a.s:11:21: error: invalid variant 'plt'
  tail36 $t0, ifunc@plt # enable ifunc, not relaxed
                    ^

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36.s (82582 of 84047)
******************** TEST 'lld :: ELF/loongarch-relax-call36.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && split-file /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && cd /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ split-file /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ cd /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
RUN: at line 6: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
a.s:4:17: error: invalid variant 'plt'
  tail36 $t0, a@plt # relaxed. la64: b
                ^
a.s:15:17: error: invalid variant 'plt'

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 9, 2025

LLVM Buildbot has detected a new failure on builder lld-x86_64-ubuntu-fast running on as-builder-4 while building lld at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/33/builds/12694

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'lld :: ELF/loongarch-relax-call36-2.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && split-file /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && cd /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ rm -rf /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ split-file /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ cd /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
RUN: at line 5: /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
a.s:10:16: error: invalid variant 'plt'
  call36 ifunc@plt      # enable ifunc, not relaxed
               ^
a.s:11:21: error: invalid variant 'plt'
  tail36 $t0, ifunc@plt # enable ifunc, not relaxed
                    ^

--

********************


@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 9, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-bootstrap-msan running on sanitizer-buildbot5 while building lld at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/164/builds/7926

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 89547 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36-2.s (88071 of 89547)
******************** TEST 'lld :: ELF/loongarch-relax-call36-2.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && split-file /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && cd /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ rm -rf /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ split-file /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ cd /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
RUN: at line 5: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
+ /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
a.s:10:16: error: invalid variant 'plt'
  call36 ifunc@plt      # enable ifunc, not relaxed
               ^
a.s:11:21: error: invalid variant 'plt'
  tail36 $t0, ifunc@plt # enable ifunc, not relaxed
                    ^

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36.s (88072 of 89547)
******************** TEST 'lld :: ELF/loongarch-relax-call36.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && split-file /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && cd /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ rm -rf /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ split-file /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ cd /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
RUN: at line 6: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
+ /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
a.s:4:17: error: invalid variant 'plt'
  tail36 $t0, a@plt # relaxed. la64: b
                ^
a.s:15:17: error: invalid variant 'plt'
Step 11 (stage2/msan check) failure: stage2/msan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 89547 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36-2.s (88071 of 89547)
******************** TEST 'lld :: ELF/loongarch-relax-call36-2.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && split-file /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && cd /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ rm -rf /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ split-file /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ cd /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
RUN: at line 5: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
+ /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
a.s:10:16: error: invalid variant 'plt'
  call36 ifunc@plt      # enable ifunc, not relaxed
               ^
a.s:11:21: error: invalid variant 'plt'
  tail36 $t0, ifunc@plt # enable ifunc, not relaxed
                    ^

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36.s (88072 of 89547)
******************** TEST 'lld :: ELF/loongarch-relax-call36.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && split-file /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && cd /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ rm -rf /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ split-file /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ cd /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
RUN: at line 6: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
+ /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
a.s:4:17: error: invalid variant 'plt'
  tail36 $t0, a@plt # relaxed. la64: b
                ^
a.s:15:17: error: invalid variant 'plt'
Step 13 (stage3/msan check) failure: stage3/msan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86533 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36-2.s (85062 of 86533)
******************** TEST 'lld :: ELF/loongarch-relax-call36-2.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && split-file /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && cd /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ rm -rf /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ split-file /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ cd /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
RUN: at line 5: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
+ /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
a.s:10:16: error: invalid variant 'plt'
  call36 ifunc@plt      # enable ifunc, not relaxed
               ^
a.s:11:21: error: invalid variant 'plt'
  tail36 $t0, ifunc@plt # enable ifunc, not relaxed
                    ^

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36.s (85063 of 86533)
******************** TEST 'lld :: ELF/loongarch-relax-call36.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && split-file /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && cd /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ rm -rf /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ split-file /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ cd /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
RUN: at line 6: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
+ /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
a.s:4:17: error: invalid variant 'plt'
  tail36 $t0, a@plt # relaxed. la64: b
                ^
a.s:15:17: error: invalid variant 'plt'

@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 9, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-bootstrap-ubsan running on sanitizer-buildbot10 while building lld at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/85/builds/6310

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86980 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36-2.s (85509 of 86980)
******************** TEST 'lld :: ELF/loongarch-relax-call36-2.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && split-file /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && cd /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ split-file /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ cd /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
RUN: at line 5: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
a.s:10:16: error: invalid variant 'plt'
  call36 ifunc@plt      # enable ifunc, not relaxed
               ^
a.s:11:21: error: invalid variant 'plt'
  tail36 $t0, ifunc@plt # enable ifunc, not relaxed
                    ^

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36.s (85512 of 86980)
******************** TEST 'lld :: ELF/loongarch-relax-call36.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && split-file /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && cd /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ split-file /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ cd /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
RUN: at line 6: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
a.s:4:17: error: invalid variant 'plt'
  tail36 $t0, a@plt # relaxed. la64: b
                ^
a.s:15:17: error: invalid variant 'plt'
Step 11 (stage2/ubsan check) failure: stage2/ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86980 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36-2.s (85509 of 86980)
******************** TEST 'lld :: ELF/loongarch-relax-call36-2.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && split-file /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp && cd /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ split-file /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/lld/test/ELF/loongarch-relax-call36-2.s /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
+ cd /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36-2.s.tmp
RUN: at line 5: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.o
a.s:10:16: error: invalid variant 'plt'
  call36 ifunc@plt      # enable ifunc, not relaxed
               ^
a.s:11:21: error: invalid variant 'plt'
  tail36 $t0, ifunc@plt # enable ifunc, not relaxed
                    ^

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36.s (85512 of 86980)
******************** TEST 'lld :: ELF/loongarch-relax-call36.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && split-file /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && cd /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ split-file /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ cd /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
RUN: at line 6: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
a.s:4:17: error: invalid variant 'plt'
  tail36 $t0, a@plt # relaxed. la64: b
                ^
a.s:15:17: error: invalid variant 'plt'
Step 13 (stage3/ubsan check) failure: stage3/ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 84047 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36.s (82586 of 84047)
******************** TEST 'lld :: ELF/loongarch-relax-call36.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 4: rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && split-file /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp && cd /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ rm -rf /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ split-file /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/lld/test/ELF/loongarch-relax-call36.s /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
+ cd /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/tools/lld/test/ELF/Output/loongarch-relax-call36.s.tmp
RUN: at line 6: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
+ /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/llvm-mc -filetype=obj -triple=loongarch64 -mattr=+relax a.s -o a.64.o
a.s:4:17: error: invalid variant 'plt'
  tail36 $t0, a@plt # relaxed. la64: b
                ^
a.s:15:17: error: invalid variant 'plt'
  call36 _start@plt         # relaxed. la64: bl
                ^
a.s:16:22: error: invalid variant 'plt'
  tail36 $t0, _start@plt    # relaxed. la64: b
                     ^
a.s:19:17: error: invalid variant 'plt'
  call36 _start@plt         # relaxed. la64: bl
                ^
a.s:20:22: error: invalid variant 'plt'
  tail36 $t0, _start@plt    # relaxed. la64: b
                     ^
a.s:23:17: error: invalid variant 'plt'
  call36 _start@plt         # exceed range, not relaxed
                ^
a.s:24:21: error: invalid variant 'plt'
  tail36 $t0,_start@plt     # exceed range, not relaxed
                    ^

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: ELF/loongarch-relax-call36-2.s (82587 of 84047)

nico added a commit that referenced this pull request Mar 9, 2025
This reverts commit 6fbe491.
Broke check-lld, see the many bot comments on
#123576
@nico
Copy link
Contributor

nico commented Mar 9, 2025

This broke tests (http://45.33.8.238/linux/162355/step_10.txt ; but also the many bot comments above). Please run tests before committing.

Given that bots reported this a few hours ago, I've reverted this for now in f3dd9c9

llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Mar 9, 2025
…36 (#123576)"

This reverts commit 6fbe491.
Broke check-lld, see the many bot comments on
llvm/llvm-project#123576
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants