[PATCH] Allow memset local PLT reference for RISC-V.

Alistair Francis alistair23@gmail.com
Mon Jun 29 15:58:28 GMT 2020


On Mon, Jun 29, 2020 at 2:11 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Alistair Francis via Libc-alpha:
>
> > On Tue, Jun 23, 2020 at 12:19 AM Andreas Schwab <schwab@linux-m68k.org> wrote:
> >>
> >> On Jun 22 2020, Alistair Francis via Libc-alpha wrote:
> >>
> >> > This is similar to commit a26e2e9feab87d4f745c31411458b048742ac733
> >> > "Allow memset local PLT reference for powerpc soft-float.".
> >> >
> >> > GCC 10.1 results in the localplt test failing for RISC-V.
> >>
> >> Why doesn't the redirect in sysdeps/generic/symbol-hacks.h work?
> >
> > I'm not sure.
> >
> > I  suspect it's the same reason it didn't work in the commit this is
> > based off: a26e2e9feab87d4f745c31411458b048742ac733
> > "Allow memset local PLT reference for powerpc soft-float.".
> >
> > The error is part of glibc's check scripts. I'm assuming memset is in
> > the binary which produces a check failure as we don't expect it to be.
> > I'm not sure where sysdeps/generic/symbol-hacks.h is involved in this
> > process though.
>
> Please post disassembly showing the location of the PLT calls.  Which
> functions have them?

Sorry, I was waiting on my build to finish (I forgot to keep the
artifacts the first time).

I'm assuming you wanted the objdump of libc.a?

I see this (which I'm guessing is the PLT call) in libc.a

00000012 <.LVL4>:
    *ptr++ = 0ul;
  12:   00000097                auipc   ra,0x0
                        12: R_RISCV_CALL        memset
                        12: R_RISCV_RELAX       *ABS*
  16:   000080e7                jalr    ra # 12 <.LVL4>

Which is called from the __sigblock() function.

Alistair

>
> Thanks,
> Florian
>


More information about the Libc-alpha mailing list