[lld] [lld][ELF][RISC-V] Fixes undefined_cc symbol (PR #203800)

via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 14 15:55:43 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 3888 tests passed
* 225 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### lld
<details>
<summary>lld.ELF/riscv-variant-cc.s</summary>

```
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 3
rm -rf /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/riscv-variant-cc.s.tmp && split-file /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/riscv-variant-cc.s /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/riscv-variant-cc.s.tmp && cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/riscv-variant-cc.s.tmp
# executed command: rm -rf /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/riscv-variant-cc.s.tmp
# note: command had no output on stdout or stderr
# executed command: split-file /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/riscv-variant-cc.s /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/riscv-variant-cc.s.tmp
# note: command had no output on stdout or stderr
# executed command: cd /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lld/test/ELF/Output/riscv-variant-cc.s.tmp
# note: command had no output on stdout or stderr
# RUN: at line 5
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -filetype=obj -triple=riscv64 1.s -o 1.o
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -filetype=obj -triple=riscv64 1.s -o 1.o
# note: command had no output on stdout or stderr
# RUN: at line 6
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld 1.o --shared -o 1.so
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld 1.o --shared -o 1.so
# note: command had no output on stdout or stderr
# RUN: at line 7
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-readelf -d -s 1.so | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CHECK1 /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/riscv-variant-cc.s
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-readelf -d -s 1.so
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CHECK1 /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/riscv-variant-cc.s
# note: command had no output on stdout or stderr
# RUN: at line 14
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -filetype=obj -triple=riscv64 2.s -o 2.o
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -filetype=obj -triple=riscv64 2.s -o 2.o
# note: command had no output on stdout or stderr
# RUN: at line 15
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld 2.o --shared -o 2.so
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld 2.o --shared -o 2.so
# note: command had no output on stdout or stderr
# RUN: at line 16
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-readelf -d -s 2.so | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CHECK2 /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/riscv-variant-cc.s
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-readelf -d -s 2.so
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CHECK2 /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/riscv-variant-cc.s
# note: command had no output on stdout or stderr
# RUN: at line 24
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -filetype=obj -triple=riscv32 3.s -o 3.o
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -filetype=obj -triple=riscv32 3.s -o 3.o
# note: command had no output on stdout or stderr
# RUN: at line 25
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld 3.o --shared -o 3.so
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld 3.o --shared -o 3.so
# note: command had no output on stdout or stderr
# RUN: at line 26
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-readelf -d -s 3.so | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CHECK3 /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/riscv-variant-cc.s
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-readelf -d -s 3.so
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CHECK3 /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/riscv-variant-cc.s
# note: command had no output on stdout or stderr
# RUN: at line 33
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -filetype=obj -triple=riscv32 4.s -o 4.o
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -filetype=obj -triple=riscv32 4.s -o 4.o
# note: command had no output on stdout or stderr
# RUN: at line 34
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld 4.o --shared -o 4.so
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld 4.o --shared -o 4.so
# note: command had no output on stdout or stderr
# RUN: at line 35
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-readelf -d -s 4.so | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CHECK4 /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/riscv-variant-cc.s
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-readelf -d -s 4.so
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CHECK4 /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/riscv-variant-cc.s
# note: command had no output on stdout or stderr
# RUN: at line 41
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -filetype=obj -triple=riscv64 5.s -o 5.o
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -filetype=obj -triple=riscv64 5.s -o 5.o
# note: command had no output on stdout or stderr
# RUN: at line 42
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld 5.o --shared -o 5.so
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld 5.o --shared -o 5.so
# note: command had no output on stdout or stderr
# RUN: at line 43
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-readelf -d -s 5.so | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CHECK5 /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/riscv-variant-cc.s
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-readelf -d -s 5.so
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CHECK5 /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/riscv-variant-cc.s
# note: command had no output on stdout or stderr
# RUN: at line 58
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -filetype=obj -triple=riscv64 6a.s -o 6a.o
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -filetype=obj -triple=riscv64 6a.s -o 6a.o
# note: command had no output on stdout or stderr
# RUN: at line 59
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -filetype=obj -triple=riscv64 6b.s -o 6b.o
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -filetype=obj -triple=riscv64 6b.s -o 6b.o
# note: command had no output on stdout or stderr
# RUN: at line 60
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld 6b.o --shared -o 6b.so
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld 6b.o --shared -o 6b.so
# note: command had no output on stdout or stderr
# RUN: at line 61
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld 6a.o 6b.so --shared -o 6.so
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld 6a.o 6b.so --shared -o 6.so
# note: command had no output on stdout or stderr
# RUN: at line 62
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-readelf -d -s 6.so | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CHECK6 /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/riscv-variant-cc.s
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-readelf -d -s 6.so
# .---command stdout------------
# | Dynamic section at offset 0x2f0 contains 13 entries:
# |   Tag                Type               Name/Value
# |   0x0000000000000001 (NEEDED)           Shared library: [6b.so]
# |   0x0000000000000017 (JMPREL)           0x298
# |   0x0000000000000002 (PLTRELSZ)         24 (bytes)
# |   0x0000000070000001 (RISCV_VARIANT_CC) 0x0
# |   0x0000000000000003 (PLTGOT)           0x33c0
# |   0x0000000000000014 (PLTREL)           RELA
# |   0x0000000000000006 (SYMTAB)           0x200
# |   0x000000000000000b (SYMENT)           24 (bytes)
# |   0x0000000000000005 (STRTAB)           0x288
# |   0x000000000000000a (STRSZ)            15 (bytes)
# |   0x000000006ffffef5 (GNU_HASH)         0x248
# |   0x0000000000000004 (HASH)             0x268
# |   0x0000000000000000 (NULL)             0x0
# | 
# | Symbol table '.dynsym' contains 3 entries:
# |    Num:    Value          Size Type    Bind   Vis                    Ndx Name
# |      0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT                UND 
# |      1: 0000000000000000     0 FUNC    GLOBAL DEFAULT [VARIANT_CC]   UND ext
# |      2: 00000000000012b0     0 NOTYPE  GLOBAL DEFAULT                  6 foo
# | 
# | Symbol table '.symtab' contains 5 entries:
# |    Num:    Value          Size Type    Bind   Vis                    Ndx Name
# |      0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT                UND 
# |      1: 00000000000012b0     0 NOTYPE  LOCAL  DEFAULT                  6 $xrv64i2p1
# |      2: 00000000000022f0     0 NOTYPE  LOCAL  HIDDEN                   8 _DYNAMIC
# |      3: 00000000000012b0     0 NOTYPE  GLOBAL DEFAULT                  6 foo
# |      4: 0000000000000000     0 FUNC    GLOBAL DEFAULT [VARIANT_CC]   UND ext
# `-----------------------------
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CHECK6 /home/gha/actions-runner/_work/llvm-project/llvm-project/lld/test/ELF/riscv-variant-cc.s
# .---command stderr------------
# | error: no check strings found with prefix 'CHECK6:'
# `-----------------------------
# error: command failed with exit status: 2

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/203800


More information about the llvm-commits mailing list