From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by sourceware.org (Postfix) with ESMTPS id 981F03851C03 for ; Fri, 29 May 2020 01:02:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 981F03851C03 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nelson.chu@sifive.com Received: by mail-io1-xd43.google.com with SMTP id y5so543305iob.12 for ; Thu, 28 May 2020 18:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=X/Si+tGIjNEr/UcywXKm11CkfI4pk4GDPNMSXJahPJs=; b=XresBAjvcp1dinOs3/xmSu3zmujY1QsVoS3XcZ185ma0m/HcMytY/YF8Yzv1K/sHF7 gZmqfl/HCtAf0Ql56fKHpW1yQBhTsI/5U34xdiavJGHRHWvapD2vBVnAnMlu+ABvDxMl 2XcUoevoHxfBuCx+0rEARMhMt31skALIdflA1vbmLdxQs5Vb7PZPqRkXDE7NkxplCLqg fgykr4uD7oiMtWhpKDrK7/PRVVpIfzFvsd5cgSuCzlebk8V7dpz0kSGMIizj6M9rw9ko 5Z2ybtBM0+QxmKw1gBGdcKfUAFlSdEdsDN4Y3Vcz9fAY3ZOkSztju2l7wtp32nDinnjB ITpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=X/Si+tGIjNEr/UcywXKm11CkfI4pk4GDPNMSXJahPJs=; b=Vb60gS/oAmVyZBDg/YCmvq03ZFoKxrTbHnsws+j9nNlbk7Rv86uKRoNYXhgmYictld DzQyROveR6KxNQL9BP6DRG397Oph1J1uCHnSHh1Yv784fl/VFgSXK9TE/1cTdFcorKzA uZyqdOFgUfXoEL/T7+CavtucqVLbNbK7S9uyklQ48EfyAcrejdBxSlE04r5/Ii/esv1j cfuI0wwnqQuO84S8yLWjAhjZzMV+4Zz6bW5XzAK4IaGk4hqgFVRjj7WlQgxGVcUENIp0 xcCg6JiBlATj6lOGZb4p579sd9KD4VUWsdUiCJA/RzqlqUnOQ8bU9Ukzzps+O1y/heL9 R5Yw== X-Gm-Message-State: AOAM532FCtHS7BE5v03GZMKDr2BvZYFeY8UZQ060ANQrc8dJSEIG8b9T j+LvyyayCLlXMs7p9nMPnTr12/510UHEicc0XKNc0g== X-Google-Smtp-Source: ABdhPJzAEGo7kJlGfnZ8EZYmqU+zWWkF41XqQs5Q6cAKwHtG+AdxKHtp/9RqIajW/ADrzhtCV4Qb1jftleNnpiZW2Go= X-Received: by 2002:a05:6602:2c8f:: with SMTP id i15mr4695897iow.45.1590714140743; Thu, 28 May 2020 18:02:20 -0700 (PDT) MIME-Version: 1.0 References: <1588733747-18787-1-git-send-email-nelson.chu@sifive.com> <08e32e0b-af89-ed39-242b-9dcb4bf939f4@redhat.com> In-Reply-To: From: Nelson Chu Date: Fri, 29 May 2020 09:02:11 +0800 Message-ID: Subject: Re: [PATCH v2 0/9] RISC-V: Support version controling for ISA standard extensions and CSR To: Jim Wilson Cc: Nick Clifton , Alex Bradbury , Kito Cheng , Binutils Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 01:02:23 -0000 Hi Jim, On Fri, May 29, 2020 at 4:09 AM Jim Wilson 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