[lld] [lld][ELF] Fix crash when relaxation pass encounters synthetic sections (PR #184758)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 6 00:21:53 PST 2026
================
@@ -1016,8 +1020,11 @@ bool RISCV::relaxOnce(int pass) const {
for (OutputSection *osec : ctx.outputSections) {
if (!(osec->flags & SHF_EXECINSTR))
continue;
- for (InputSection *sec : getInputSections(*osec, storage))
+ for (InputSection *sec : getInputSections(*osec, storage)) {
+ if (!sec->relaxAux)
----------------
MaskRay wrote:
```
for ...
if
changed |= ..
```
since the body has just one line.
https://github.com/llvm/llvm-project/pull/184758
More information about the llvm-commits
mailing list