From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by sourceware.org (Postfix) with ESMTPS id DD3D73857C41 for ; Tue, 25 Aug 2020 17:13:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org DD3D73857C41 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dabbelt.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=palmer@dabbelt.com Received: by mail-pg1-x541.google.com with SMTP id h12so7267342pgm.7 for ; Tue, 25 Aug 2020 10:13:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20150623.gappssmtp.com; s=20150623; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=K8PD4KmuatkTM4KWX1fNckoyeP9fTRGBEcobU9tny38=; b=Ia4DDjmnkj5Fi9pvZyX6ZUfigBezqPDbt0FlYP6Ws7tPvtYhnG2R+6/rmSyG0iHwlV s9/kVJ20SAtihVOjV5buYl93DXDYJM8fTCuSwnU+XLENStuhBkqDcD3Hgmr7BIX+f3+q tzac6DOki0ILwNs02dfumkY4Z7Z7N2LZ0eOLLh5L1prWxve9jzxq8/dbHaVhp4+Q46kJ CrVoS/QoQo2iNXeycMPfdAO+rLg2MWcfGvS/njafidfI7w5zRRKX4JqQ+z155ZkmPPD+ Gl1T8EIRYnJff1/IlaU8hayhkgxc2qKXMpHpDBbRzq7/EI79x0wjzP9L+dyCxrloBhM7 j/yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=K8PD4KmuatkTM4KWX1fNckoyeP9fTRGBEcobU9tny38=; b=Y3lbTLEMH8+GIED7NRKi5O5Wk+95qYg99TOZ4N0vPCqhKsNtRqwodAVl86AIfl92bq 5QDXYK6plxkucdWK9aWD4i5KF+W10YD08KPev8OzXW0oyUHrdWxLKnuQ5IzGVWwUiHqm Kbzanb4HiPuD/P0+Yj1im6ycfGzUo7LFh/cGdQwajOK7FB8wBkz21jmNlGCNxHxZDzLy s/qKM08FrdqtIKWhlxe1BaJ+iSJBt33XnaMpOpSLwhs1kiECYYbpoL+b01IkXNP7CiJl K3519tV1q4PZ+o0iHMx4ju+vKzK3LR3uiZfqo7Wdub26XHoVDUnp7J2cEqVCugPBGXyc NjdA== X-Gm-Message-State: AOAM533MwvQqLkDS+gQA7WgfHohp8UlidjXYY88dACiUrMH1lW5R5zQE Jv2KC6w9giTYLPs950d94iYIzbX25SLh5g== X-Google-Smtp-Source: ABdhPJxTgNdWNzI+OzZEgzFmcXhFYHResrDQkNQx+wTgEO39LMi1X0BGEBZWeGFa1Y2r7jzpfREeyA== X-Received: by 2002:a63:4b10:: with SMTP id y16mr7432205pga.93.1598375610541; Tue, 25 Aug 2020 10:13:30 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id z2sm16412196pfq.46.2020.08.25.10.13.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Aug 2020 10:13:29 -0700 (PDT) Date: Tue, 25 Aug 2020 10:13:29 -0700 (PDT) X-Google-Original-Date: Tue, 25 Aug 2020 10:13:28 PDT (-0700) Subject: Re: [PATCH 0/3] Allow to link objects with different versions of ISA, and fix some minor issues In-Reply-To: <1597905282-22927-1-git-send-email-nelson.chu@sifive.com> CC: binutils@sourceware.org, kito.cheng@sifive.com From: Palmer Dabbelt To: nelson.chu@sifive.com Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, 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: Tue, 25 Aug 2020 17:13:33 -0000 On Wed, 19 Aug 2020 23:34:39 PDT (-0700), nelson.chu@sifive.com wrote: > Hi binutils, > > There are three patches used to fix some minor issues when linker merging > ELF attributes. > > * The first patch from Kito cheng fixs the wrong error reports when the ISA > versions are mis-matched. Consider the following case, > > $ cat a.s > .attribute arch, "rv64i2p0_m2p0_a2p0" > $ cat b.s > .attribute arch, "rv64i2p0_m2p0_a3p0" > $ riscv64-unknown-elf-as a.s -o a.o > $ riscv64-unknown-elf-as b.s -o b.o > $ riscv64-unknown-elf-ld -r a.o b.o > riscv64-unknown-elf-ld: error: b.o: Mis-matched ISA version for 'm' extension. 2.0 vs 2.0 > riscv64-unknown-elf-ld: failed to merge target specific data of file b.o > > But the mis-matched ISA should be 'a' rather than 'm'. This patch will fix > the wrong message. > > $ riscv64-unknown-elf-ld-new -r a.o b.o > riscv64-unknown-elf-ld: error: b.o: Mis-matched ISA version for 'a' extension. 3.0 vs 2.0 > > * The second patch allows to link objects with different versions of ISA. > The different ISA versions should be compatible, unless there are some known > conflicts. Same as what the privileged spec attributes did, report warnings > for those different ISA versions are merged should be enough. So the above > mis-matched errors will be changed to warnings, > > $ riscv64-unknown-elf-ld-new -r a.o b.o > riscv64-unknown-elf-ld: warning: b.o: Mis-matched ISA version 3.0 for 'a' extension, the output version is 2.0. > > * And the third patch just fixs typos amd do some minor cleanups when merging priv spec attributes. > > Thanks > Nelson These LGTM. Thanks!