[lld] [lld][ELF] Fix crash when relaxation pass encounters synthetic sections (PR #184758)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 6 01:15:14 PST 2026
================
@@ -0,0 +1,37 @@
+# REQUIRES: loongarch
+# RUN: rm -rf %t && split-file %s %t
+# RUN: llvm-mc --filetype=obj -triple=loongarch64 -mattr=+relax %t/a.s -o %t/a.o
+
+## Do not crash when we encounter a synthetic section (like .got) that has
+## been placed inside an executable output section via a linker script.
+## Synthetic sections do not have relaxAux data structures initialized.
+
+# RUN: ld.lld -T %t/a.ld %t/a.o -o %t/nopie
----------------
wangleiat wrote:
I'm not sure if my understanding is correct: the code checks the PIE flag in the .dynamic section.
https://github.com/llvm/llvm-project/pull/184758
More information about the llvm-commits
mailing list