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

Nylon Chen
2023-06-15T08:43:47Z

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@microchip.com<mailto:conor.dooley@microchip.com>> 於 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.