Re: [PATCH] modpost: Ignore relaxation and alignment marker relocs on LoongArch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Xuerui,

Could you please update a V2 to just modify the commit message?

Huacai

On Fri, Jan 5, 2024 at 6:11 PM Jinyang He <hejinyang@xxxxxxxxxxx> wrote:
>
>
> On 2024-01-05 16:09, Tiezhu Yang wrote:
> >
> >
> > On 01/05/2024 12:26 AM, Xi Ruoyao wrote:
> >> On Thu, 2024-01-04 at 16:57 +0800, Huacai Chen wrote:
> >>> On Wed, Dec 27, 2023 at 7:06 PM Xi Ruoyao <xry111@xxxxxxxxxxx> wrote:
> >>>>
> >>>> On Wed, 2023-12-27 at 15:03 +0800, WANG Xuerui wrote:
> >>>>> And even though the kernel is built with relaxation disabled, so
> >>>>> far a small number of R_LARCH_RELAX marker relocs are still
> >>>>> emitted as
> >>>>> part of la.* pseudo instructions in assembly.
> >>>>
> >>>> I'd consider it a toolchain bug...  Is there a reproducer?
> >>> Any updates? Should I apply this patch for loongarch-next?
> >>
> >> Tiezhu told me this should be reproducible with GCC 14 and Binutils-2.42
> >> development snapshots and defconfig.  I'm trying...
> >
> > 1. How to reproduce
> >
> > I update the latest upstream toolchains (20240105):
> >
> > [fedora@linux 6.7.test]$ gcc --version
> > gcc (GCC) 14.0.0 20240105 (experimental)
> > [fedora@linux 6.7.test]$ as --version
> > GNU assembler (GNU Binutils) 2.41.50.20240105
> > [fedora@linux 6.7.test]$ ld --version
> > GNU ld (GNU Binutils) 2.41.50.20240105
> >
> > and then test it again, here is the failure info:
> >
> > [fedora@linux 6.7.test]$ git log --oneline | head -1
> > 610a9b8f49fb Linux 6.7-rc8
> > [fedora@linux 6.7.test]$ make loongson3_defconfig
> > [fedora@linux 6.7.test]$ make
> > ...
> >   AR      built-in.a
> >   AR      vmlinux.a
> >   LD      vmlinux.o
> >   OBJCOPY modules.builtin.modinfo
> >   GEN     modules.builtin
> >   GEN     .vmlinux.objs
> >   MODPOST Module.symvers
> > make[2]: *** [scripts/Makefile.modpost:145: Module.symvers] Error 139
> > make[1]: *** [/home/fedora/6.7.test/Makefile:1863: modpost] Error 2
> > make: *** [Makefile:234: __sub-make] Error 2
> >
> > 2. Additional info
> >
> > I can confirm that the slightly older version of toolchains (20231127)
> > have no the above failure, so I guess this is related with toolchains.
> >
> > 3. How to fix
> >
> > (1) One way is to modify the kernel code, with this kernel patch,
> >     there is no building failure with the latest upstream toolchains.
> > (2) The other way is to analysis and fix the binutils code,
> >     it need more work to do.
>
> Hi,
>
> I have an idea about that, but I didn't really get into it. The improved
> R_LARCH_ALIGN (psABI v2.30) requires a symbol index. The symbol is only
> created at the first time to handle alignment directive. This means that
> all other sections may use this symbol. If the section of this symbol is
> discarded, there may be problems.
>
> Thanks,
>
> Jinyang
>
>
> >
> > Thanks,
> > Tiezhu
> >
>





[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux