Re: [PATCH] LoongArch: only insert align section for ld -r if an input has R_LARCH_ALIGN
Xi Ruoyao via Binutils <[email protected]>
| Newsgroups | gmane.comp.gnu.binutils |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 2026-07-14 at 19:48 +0800, Xi Ruoyao wrote:
> Commit 8bf4b69718d4 ("LoongArch: Fix relaxation alignment with ld -r
> (PR
> 33236)") has broken the kernel modules on Debian sid. The expectation
> of the kernel is all the source files which would be linked into a
> module are compiled with -mno-relax so the module should not contain
> R_LARCH_ALIGN, thus the module loader rejects any module containing
> R_LARCH_ALIGN.
>
> To restore the correctness of the expectation, only insert the align
> section if an input has R_LARCH_ALIGN. It also does not make too much
Oops, this is not correct. If an input has no R_LARCH_ALIGN but some
R_LARCH_RELAX, we need to insert the align section as well.
I'll submit V2.
--
Xi Ruoyao <[email protected]>