Re: [PATCH v2] RISC-V: Support 32_PCREL relocation type in kernel module

From: Nylon Chen
Date: Thu Jun 15 2023 - 04:43:47 EST


On Thu, Jun 15, 2023 at 09:11:33AM +0100, Conor Dooley wrote:
Hi Conor,
> Hey Nylon,
>
> Firstly, no html emails please :/
Sorry, my Gmail settings got messed up. I will be more careful in the future.
>
> On Thu, Jun 15, 2023 at 03:52:27PM +0800, Nylon Chen wrote:
> > Conor Dooley <conor.dooley@xxxxxxxxxxxxx<mailto:conor.dooley@xxxxxxxxxxxxx>> 於 2023年6月15日 週四 下午3:38寫道:
> > > On Thu, Jun 15, 2023 at 03:23:02PM +0800, Nylon Chen wrote:
> > > > Fix the 'unsupported relocation type' error caused by
> > > > enabling the -fasynchronous-unwind-tables flag,
> > > > which generates relocation types that are not supported.
> > >
> > > What commit adds the -fasynchronous-unwind-tables flag?
> > sorry my description is not correct, please allow me to add
> >
> > I mean, when we use the flag "-fasynchronous-unwind-tables," it generates
> > the relocation type R_RISCV_32_PCCREL. However, this type is currently not
> > supported, so an error will occur.
>
> (snip)
>
> > > Should there be a Fixes: tag for that commit?
>
> > yes, I will do it.
>
> What mainline commit actually enables this flag?
Because LLVM currently has it enabled by default(https://reviews.llvm.org/D145164), it will generate this
relocation type.

>From what I know, GCC will also enable it in the future.

>
> Cheers,
> Conor.