public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nelson Chu <nelson.chu@sifive.com>
To: Jim Wilson <jimw@sifive.com>
Cc: Nick Clifton <nickc@redhat.com>, Alex Bradbury <asb@lowrisc.org>,
	 Kito Cheng <kito.cheng@sifive.com>,
	Binutils <binutils@sourceware.org>
Subject: Re: [PATCH v2 0/9] RISC-V: Support version controling for ISA standard extensions and CSR
Date: Fri, 29 May 2020 09:02:11 +0800	[thread overview]
Message-ID: <CAJYME4FFQSU-Z4LrGp5-GuaOkyntu2gLApO-PQ2Jvg1a6J6q_Q@mail.gmail.com> (raw)
In-Reply-To: <CAFyWVaZy9e9aRTRKqzfiJGMBXDYFGOShikWio56PwzjG22ODkA@mail.gmail.com>

Hi Jim,

On Fri, May 29, 2020 at 4:09 AM Jim Wilson <jimw@sifive.com> wrote:
>
> I noticed that my riscv32-elf ld testsuite results went from 490
> passes to 345 passes after an update indicating that something major
> broke.  Bisecting took me to this patch.  Looking at the ld.log file,
> I see
>
> Executing on host: sh -c {riscv32-unknown-elf-gcc -B/home/jimw/FOSS/BINUTILS/X-\
> test-rv32-elf-new/ld/tmpdir/ld/   -L/home/jimw/FOSS/install-riscv32/riscv32-unk\
> nown-elf/lib  tmpdir/compiler11685.c -o tmpdir/compiler11685.out 2>&1}  /dev/nu\
> ll ld.tmp (timeout = 300)
> spawn [open ...]^M
> /home/jimw/FOSS/BINUTILS/X-test-rv32-elf-new/ld/tmpdir/ld/collect-ld: error: /t\
> mp/ccJmOmJk.o: conflicting priv spec version (major/minor/revision).
> /home/jimw/FOSS/BINUTILS/X-test-rv32-elf-new/ld/tmpdir/ld/collect-ld: error: /t\
> mp/ccJmOmJk.o: conflicting priv spec version (major/minor/revision).
> /home/jimw/FOSS/BINUTILS/X-test-rv32-elf-new/ld/tmpdir/ld/collect-ld: failed to\
>  merge target specific data of file /tmp/ccJmOmJk.o
> collect2: error: ld returned 1 exit status
>
> This is check_compiler_available, so any test that needs a compiler
> fails to run.
>
> Apparently object files created with this patch are not compatible
> with object files created without this patch.  The error message
> doesn't indicate exactly what the priv spec conflict is, or exactly
> which files are conflicting, so isn't very user friendly.  I had to
> rerun the linker under the debugger to see what is going on.  The old
> crt0.o file has
> Attribute Section: riscv
> File Attributes
>   Tag_RISCV_arch: "rv32i2p0_m2p0_a2p0_f2p0_d2p0_c2p0"
> and the new tmp.o created with the patch has
> Attribute Section: riscv
> File Attributes
>   Tag_RISCV_stack_align: 16-bytes
>   Tag_RISCV_arch: "rv32i2p0_m2p0_a2p0_f2p0_d2p0_c2p0"
>   Tag_RISCV_priv_spec: 1
>   Tag_RISCV_priv_spec_minor: 11
> so it appears that absence of the new Tag_RISCV_pric_spec is
> considered a hard incompatibility.  I would argue that an object file
> without a priv spec version set should be allowed to link with any
> other object file.  it is only when you have two object files with
> priv_spec tags that indicate different versions that you should error.

Sorry I didn't notice the compatibility problem.  I will fix and send
the patch to resolve it today.  However, thanks for reporting this :)

Nelson

  reply	other threads:[~2020-05-29  1:02 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06  2:55 Nelson Chu
2020-05-06  2:55 ` [PATCH v2 1/9] RISC-V: Remove the redundant gas test file Nelson Chu
2020-05-19  9:07   ` Nelson Chu
2020-05-06  2:55 ` [PATCH v2 2/9] RISC-V: Forgot to update the priv-reg-fail-read-only-01 test case Nelson Chu
2020-05-19  9:07   ` Nelson Chu
2020-05-06  2:55 ` [PATCH v2 3/9] RISC-V: Support GAS option -misa-spec to set ISA versions Nelson Chu
2020-05-19  9:07   ` Nelson Chu
2020-05-06  2:55 ` [PATCH v2 4/9] RISC-V: Support configure options to set ISA versions by default Nelson Chu
2020-05-19  9:07   ` Nelson Chu
2020-05-06  2:55 ` [PATCH v2 5/9] RISC-V: Support version checking for CSR according to privilege spec version Nelson Chu
2020-05-19  9:08   ` Nelson Chu
2020-05-06  2:55 ` [PATCH v2 6/9] RISC-V: Support configure option to choose the " Nelson Chu
2020-05-19  9:08   ` Nelson Chu
2020-05-06  2:55 ` [PATCH v2 7/9] RISC-V: Make privilege spec attributes workable Nelson Chu
2020-05-19  9:08   ` Nelson Chu
2020-05-06  2:55 ` [PATCH v2 8/9] RISC-V: Disassembler dumps the CSR according to the chosen privilege spec Nelson Chu
2020-05-19  9:08   ` Nelson Chu
2020-05-06  2:55 ` [PATCH v2 9/9] RISC-V: Add documents and --help for the new GAS and OBJDUMP options Nelson Chu
2020-05-19  9:08   ` Nelson Chu
2020-05-19  9:07 ` [PATCH v2 0/9] RISC-V: Support version controling for ISA standard extensions and CSR Nelson Chu
2020-05-20 16:27   ` Nick Clifton
2020-05-21  2:38     ` Nelson Chu
2020-05-21  7:29       ` Nick Clifton
2020-05-21  9:11         ` Nelson Chu
2020-05-28 20:09           ` Jim Wilson
2020-05-29  1:02             ` Nelson Chu [this message]
2020-06-01 21:35               ` Jim Wilson

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=CAJYME4FFQSU-Z4LrGp5-GuaOkyntu2gLApO-PQ2Jvg1a6J6q_Q@mail.gmail.com \
    --to=nelson.chu@sifive.com \
    --cc=asb@lowrisc.org \
    --cc=binutils@sourceware.org \
    --cc=jimw@sifive.com \
    --cc=kito.cheng@sifive.com \
    --cc=nickc@redhat.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 read-only IMAP folder(s) and NNTP newsgroup(s).