Upstream binutils commit a87e1817a435dab6c6c042f9306497c9f13d4236 breaks building the RISC-V vDSO

Maciej W. Rozycki macro at wdc.com
Wed Jul 22 17:50:06 EDT 2020


On Tue, 16 Jun 2020, F?ng-ru? S?ng wrote:

> > > I suggested that GNU ld from 2.35 onwards disallows accepting ET_EXEC
> > > as input (https://sourceware.org/bugzilla/show_bug.cgi?id=26047 ). The
> > > error message is from the patch.
> > > Taking ET_EXEC files as input are usually errors.
> > >
> > > If we do need to take ET_EXEC as input, we can change e_type in the
> > > ELF header to make the file an ET_REL
> > >
> > > printf '\1' | dd of=${2} conv=notrunc bs=1 seek=16 status=none
> > > (See http://git.kernel.org/linus/90ceddcb495008ac8ba7a3dce297841efcd7d584 )
> >
> > Is there a convenient way to do this in a Makefile? The relevant rule
> > is:
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/riscv/kernel/vdso/Makefile#n63
> >
> > I am not sure if that is strictly necessary, hence the initial email.
> >
> > Cheers,
> > Nathan
> 
> If I understand correctly,
> 
> $(obj)/vdso-dummy.o:
> ...
>         printf '\1' | dd of=$@ conv=notrunc bs=1 seek=16 status=none
> 
> should fix the issue. The change can be made along with the migration
> from $(CC) to $(LD). Hope an arch/riscv maintainer can do this.

 This is an LD bug in the fix for PR ld/26047, so let's not invent hacks 
to work it around.  I have filed PR ld/26288 and I'm currently verifying a 
fix along with a couple of test cases with the intent to have it all 
included with the upcoming binutils 2.35 release currently scheduled this 
coming Sat.

 Cf. <https://sourceware.org/bugzilla/show_bug.cgi?id=26288>.

  Maciej



More information about the linux-riscv mailing list