Re: [PATCH v2 3/4] LoongArch: Stop using undocumented assembler options
From: Huacai Chen
Date: Thu Jul 28 2022 - 22:48:03 EST
Hi, Ruoyao,
On Thu, Jul 28, 2022 at 9:10 PM Xi Ruoyao <xry111@xxxxxxxxxxx> wrote:
>
> On Thu, 2022-07-28 at 20:25 +0800, Huacai Chen wrote:
> > Hi, Ruoyao,
> >
> > On Thu, Jul 28, 2022 at 8:03 PM Xi Ruoyao <xry111@xxxxxxxxxxx> wrote:
> > >
> > > Now we can handle GOT and GOT-based relocations properly, remove the
> > > undocumented `-Wa,-mla-{global,local}-with-{pcrel,abs}` assembler
> > > hacks.
> > I think "-Wa,-mla-{global,local}-with-{pcrel,abs}" may be regular
> > options rather than "hacks". If I'm right, the title and commit
> > message should be updated. And we can send patches to binutils to make
> > them "documented".
>
> How about changing the message to:
>
> GCC 13 no longer generates la.global and la.local in assembly, but
> produces explicit PC-relative relocations to local symbols and GOT
> entries for global symbols instead. As the result, -Wa,-mla-* are no
> longer sufficient to control the code generation for symbol address
> loading. As now we can handle GOT and GOT-based relocations
> properly, remove those options to use GOT for global symbol address
> consistently.
GCC 13 can still generate la.global and la.local, so "GCC 13 no longer
generates la.global and la.local in assembly by default" may be
better. And "undocumented" in the title should be "non-preferred", I
think.
Huacai