linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Fāng-ruì Sòng" <maskray@google.com>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: linux-riscv@lists.infradead.org,
	Albert Ou <aou@eecs.berkeley.edu>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Paul Walmsley <paul.walmsley@sifive.com>
Subject: Re: Upstream binutils commit a87e1817a435dab6c6c042f9306497c9f13d4236 breaks building the RISC-V vDSO
Date: Fri, 12 Jun 2020 08:41:56 -0700	[thread overview]
Message-ID: <CAFP8O3+ydp6y9V4N1-9igHDhVjxqqYUecAYa3fT21FBTWtNx+w@mail.gmail.com> (raw)
In-Reply-To: <20200612084350.GA1108986@ubuntu-n2-xlarge-x86>

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 )


On Fri, Jun 12, 2020 at 1:43 AM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> Hi all,
>
> Upstream binutils commit a87e1817a4 ("Have the linker fail if any attempt
> to link in an executable is made.") causes the RISC-V vDSO to fail to
> build properly (it is fixing this bug report:
> https://sourceware.org/bugzilla/show_bug.cgi?id=26047):
>
> $ make -skj"$(nproc)" ARCH=riscv CROSS_COMPILE=riscv64-linux- O=out/riscv distclean defconfig arch/riscv/kernel/vdso/
> riscv64-linux-ld: cannot use executable file 'arch/riscv/kernel/vdso/vdso-dummy.o' as input to a link
>
> I do not really understand what the whole point of the vDSO rule is but
> it seems like it should be fixed due to this change. Additionally, the
> kernel has generally been getting rid of using $(CC) as a linker,
> instead preferring to use $(LD) directly; it would be nice if the RISC-V
> vDSO's Makefile could be rewritten to do that.
>
> See
>
> fe00e50b2db8 ("ARM: 8858/1: vdso: use $(LD) instead of $(CC) to link VDSO")
> 691efbedc60d ("arm64: vdso: use $(LD) instead of $(CC) to link VDSO")
> 2ff906994b6c ("MIPS: VDSO: Use $(LD) instead of $(CC) to link VDSO")
>
> for more examples of that. I would take a stab at it myself but this
> does not seem like a straight conversion due to the way the VDSOLD rule
> is set up.
>
> Cheers,
> Nathan



-- 
宋方睿


  reply	other threads:[~2020-06-12 15:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12  8:43 Upstream binutils commit a87e1817a435dab6c6c042f9306497c9f13d4236 breaks building the RISC-V vDSO Nathan Chancellor
2020-06-12 15:41 ` Fāng-ruì Sòng [this message]
2020-06-17  2:42   ` Nathan Chancellor
2020-06-17  3:34     ` Fāng-ruì Sòng
2020-07-16  4:09       ` Nathan Chancellor
2020-07-22 21:50       ` Maciej W. Rozycki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFP8O3+ydp6y9V4N1-9igHDhVjxqqYUecAYa3fT21FBTWtNx+w@mail.gmail.com \
    --to=maskray@google.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=linux-riscv@lists.infradead.org \
    --cc=natechancellor@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).