<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63374>63374</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
lld: error: section size decrease is too large on RISCV64
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
kraj
</td>
</tr>
</table>
<pre>
In an attemp to make LLD as default linker in a yocto distro,
when using lld/riscv64 from clang 16.0.6 several packages are failing to link with below error
```
riscv64-yoe-linux-ld.lld: error: section size decrease is too large
```
I have collected all objects and libs into a single place to reproduce it. test case is here
https://uclibc.org/~kraj/lld-riscv-fail.tar.xz
Inside the tarball there is a script called `a.sh` when run `sh ./a.sh` shows the problem.
it links fine with bfd linker, it also linked fine with lld if `--no-relax` option is added to it.
@MaskRay any ideas ?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU02PqzgQ_DXm0gIRICQ5cJidEdJIby9vpb03dhP80rGR2ySTOexvX5kw2h1pLysh82F3V3VVgSL27Ig6tf9N7d8yXOLkQ3cJ-CsbvHl07w7QAcZI1xmihyteCH78eAMUMDTiwhHYugsFsA4QHl5HD8ZKDF5Vr6p8U-XLfSIHi1h3Bmajqj5Y0be2gTH4K2hGd4ZdW5RFC0I3Csgwo77gmQQwEIxoORVHv2LB3cYJBmJ_BwrBB3jCbGtbbtf6ukHlD085W7d85GyKxKJ-eRanByEdrXcg9pPAkA6EQmAFovfAGM70n72f6ztMeCPQnpl0JAPIDH74RToKoDPAdhCwLnpASCIwwcyoKc0TaA7eLJrAxgIiSQS9YU8UaJtsinEWVb-oqldVv2i2gy58OKuq_yt5paqe2eTrrHlSq4gYio_PbzSdWEMQJ4KIYUgk4wphJfHSwc4Jm5kMqLbEQibVlrB6FxaXvskEhar6ry2Qyd9l7TgHPzBdi42vfYZCYLSONrtGswVFVa9gIyDL004y_zrGbMCOCSzPnc8DMX4kLD-vBiWuxpBJ0tlYfPO9KX9HufzEB6B7gDWEAqrun7uZ6Wpzqk-YUbdrj4eybU91k03deNRNa_DYjEbvaW_K5kR1e9o31eGww0Od2a4qq7psd8dy31S7pjg1x2bU9WF3avRgdkY1JV2T5sy3a3IlsyILdW1dH5qMcSCWr_8rdOlQPixnUU3JVqL8UxZtZOr-fzbBO_j5_sfrn22TLYG772k52zgtQ6H9dU3J7euWz8GnjKqqX_mKqvqV8t8BAAD__yrAUSQ">