[lld] [ELF] Add target-specific relocation scanning for RISC-V (PR #181332)

via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 13 22:04:57 PST 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 3109 tests passed
* 61 tests skipped
* 1 test failed

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

### lld
<details>
<summary>lld.ELF/riscv-vendor-relocations.s</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\llvm-mc.exe -triple riscv32 C:\_work\llvm-project\llvm-project\lld\test\ELF\riscv-vendor-relocations.s -filetype=obj -o C:\_work\llvm-project\llvm-project\build\tools\lld\test\ELF\Output\riscv-vendor-relocations.s.tmp.o
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llvm-mc.exe' -triple riscv32 'C:\_work\llvm-project\llvm-project\lld\test\ELF\riscv-vendor-relocations.s' -filetype=obj -o 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\ELF\Output\riscv-vendor-relocations.s.tmp.o'
# note: command had no output on stdout or stderr
# RUN: at line 3
not c:\_work\llvm-project\llvm-project\build\bin\ld.lld.exe -pie C:\_work\llvm-project\llvm-project\build\tools\lld\test\ELF\Output\riscv-vendor-relocations.s.tmp.o -o /dev/null 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\lld\test\ELF\riscv-vendor-relocations.s
# executed command: not 'c:\_work\llvm-project\llvm-project\build\bin\ld.lld.exe' -pie 'C:\_work\llvm-project\llvm-project\build\tools\lld\test\ELF\Output\riscv-vendor-relocations.s.tmp.o' -o /dev/null
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\lld\test\ELF\riscv-vendor-relocations.s'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\lld\test\ELF\riscv-vendor-relocations.s:18:10: error: CHECK: expected string not found in input
# | # CHECK: error: {{.*}}:(.text+0x4): malformed consecutive R_RISCV_VENDOR relocations
# |          ^
# | <stdin>:1:1: note: scanning from here
# | ld.lld: error: C:\_work\llvm-project\llvm-project\build\tools\lld\test\ELF\Output\riscv-vendor-relocations.s.tmp.o:(.text+0x4): unknown relocation (255) against symbol TARGET
# | ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\lld\test\ELF\riscv-vendor-relocations.s
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |           1: ld.lld: error: C:\_work\llvm-project\llvm-project\build\tools\lld\test\ELF\Output\riscv-vendor-relocations.s.tmp.o:(.text+0x4): unknown relocation (255) against symbol TARGET 
# | check:18     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |           2: ld.lld: error: undefined symbol: INVALID_VENDOR 
# | check:18     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           3: >>> referenced by C:\_work\llvm-project\llvm-project\build\tools\lld\test\ELF\Output\riscv-vendor-relocations.s.tmp.o:(.text+0x4) 
# | check:18     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           4: >>> referenced by C:\_work\llvm-project\llvm-project\build\tools\lld\test\ELF\Output\riscv-vendor-relocations.s.tmp.o:(.text+0x4) 
# | check:18     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</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/181332


More information about the llvm-commits mailing list