[lld] [lld][ELF] Fix crash when relaxation pass encounters synthetic sections (PR #184758)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 5 21:19:28 PST 2026
================
@@ -0,0 +1,28 @@
+# REQUIRES: riscv
+# RUN: rm -rf %t && split-file %s %t
+# RUN: llvm-mc --filetype=obj -triple=riscv64 %t/a.s -o %t/a.o
+# RUN: ld.lld -T %t/a.ld %t/a.o -o /dev/null
+
+## This test ensures that the relaxation pass does not crash when it encounters
----------------
MaskRay wrote:
This first part can be deleted: `Do not crash when we encounter a synthetic section`...
Consider also testing a synthetic section without relocations, e.g. .dynsym if you use `-pie`
https://github.com/llvm/llvm-project/pull/184758
More information about the llvm-commits
mailing list