From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by sourceware.org (Postfix) with ESMTPS id 416033858419 for ; Wed, 10 Aug 2022 06:33:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 416033858419 Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-31f661b3f89so132467197b3.11 for ; Tue, 09 Aug 2022 23:33:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=EoCRh2fVP8P//eEnxomer4rR56x6YILAArkSt/kkGys=; b=bPhS6Tv9DTgkwuFV2naQvaHUhQJTjtjndBI3jAG1/7itAsE/+P5drcJnn+gV6i6eL9 kj8qb4xqSOwo9/BUf6KNHy1nnmZTLanBlM9vAxlw0DbV8Km/mTmPCy9wpcG+zPBc022c xofuu5kX6Wk6O0inkOkOIFu4XV/2BRR56pgpaphFdecpCv4USg+oiZo/r2Wbz6f1rbao YGOL01srqUvkNR/8t2hUCwxXI8kI1GCo6vGxxaiukcYWPfXCEGzJFzwOlyRBIFmgqtFF 3+/i2wVYoCDpzAkChsKbxr/hqv/4T1UDs2NWFiSlELGV9NoUv/bAm2bUreSfbJ0j/zYo 3YhA== X-Gm-Message-State: ACgBeo0VnjfTuV5q5eoo2JXKTvyQ8Vh97JLS+RLUOydVfq5zouw64/17 aT/KfsnSjSEFXlrqf3hsBaOK21y8IG4SfBQlRBmlENljDEMZQA== X-Google-Smtp-Source: AA6agR61JFMUpF2bXgQWjqmTAeXOSpik5zMhaFa1YComqImCHqRSQHW/MTUVWGALBxPAtXsLcCHfLaJ/cfC0QVXe+lo= X-Received: by 2002:a81:65c2:0:b0:329:499e:a858 with SMTP id z185-20020a8165c2000000b00329499ea858mr22313929ywb.6.1660113208563; Tue, 09 Aug 2022 23:33:28 -0700 (PDT) MIME-Version: 1.0 References: <20220808065523.18152-1-maskray@google.com> <20220808172742.vlbb5hpr7yqh5led@google.com> In-Reply-To: <20220808172742.vlbb5hpr7yqh5led@google.com> From: Fangrui Song Date: Tue, 9 Aug 2022 23:33:17 -0700 Message-ID: Subject: Re: [PATCH] RISC-V: Remove R_RISCV_GNU_VTINHERIT/R_RISCV_GNU_VTENTRY To: Kito Cheng Cc: Andreas Schwab , Fangrui Song via Binutils , Kito Cheng Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-18.7 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Wed, 10 Aug 2022 06:33:33 -0000 On Mon, Aug 8, 2022 at 10:27 AM Fangrui Song wrote: > > On 2022-08-08, Kito Cheng wrote: > >Hi Andreas: > > > >> FWIW, they are still generically handled by the .vtable_inherit and > >> .vtable_entry pseudo-ops, but support for -fvtable-gc has been removed > >> from gcc in 2003. The RISC-V assembler never picked them up. > > > >Thanks for the historical data! RISC-V GNU toolchain is upstreamed > >after that time, so sounds like we could remove that safely for > >RISC-V. > > Second this. > > >> $ riscv64-suse-linux-as vtable.s > >> vtable.s: Assembler messages: > >> vtable.s:1: Error: cannot represent BFD_RELOC_VTABLE_ENTRY relocation in object file > >> vtable.s:2: Error: cannot represent BFD_RELOC_VTABLE_INHERIT relocation in object file > > > >Maybe we can improve the error message into something like: > >.vtable_inherit / .vtable_entry is unsupported for RISC-V. > > I think the diagnostic is from gas/config/tc-riscv.c:4135 . > Since gcc -fvtable-gc was gone in 2003 and we essentially cannot find > .vtable_entry uses, I think sticking with the existing generic diagnostic isn't bad. If this patch has no objection, I will push this.