From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by sourceware.org (Postfix) with ESMTPS id 91D38385AC1B for ; Mon, 8 Aug 2022 18:33:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 91D38385AC1B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dabbelt.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dabbelt.com Received: by mail-pg1-x534.google.com with SMTP id 73so9303140pgb.9 for ; Mon, 08 Aug 2022 11:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc; bh=jbM1Rd700jSU/uqffAgWvfTS9FzAXAW+x95Ww7A3W8E=; b=ZnJvjnWymV8A1PwGE4a0NdP9gx6bYVRTY3X3wMwchfhLbsFXEXnL0NCDjmqzXttJWg Imhy6icHmnp8w6VgHd0UztiwQb/PoW56J2ipCiznlamX+1A7xe8uQRWb1EeIUutRQDpM fnd6GGz/hGNZLMC83TZrHqL3FB8cpwIZGj/YvdZUYYu/Bd+7UaGKwhPMKyMrbwCnp7/n jLMslEJtzLRl8LBwotsLEecuDWkT+Bvk9ye+PIqueX2bVD9mBWhnFw0dtr2y6E2wzHz0 QqU6dj+Yd55OvTQLvRLuzDJz4cXsyCX6bzORLSlkV7TTKPiY6j1/xxBvidCvzraIsX4U zuvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc; bh=jbM1Rd700jSU/uqffAgWvfTS9FzAXAW+x95Ww7A3W8E=; b=z5PNbJKnF7JU7zqYRRc1BIoF5sUyhByhzeRCgXr2womKAY1SoW1740v/xJLrYTh0/T cugWVv5tW4nQtMXvugc0ygIshENBVQbbPF4rJr6mgtc7u5vcrZZmFduWMVcrayEBCVWy Oc5vhzdhmUvKYco2LNOHPZHP7nqFn+/p4SxlxaT8B1ywreIjV/5Y8Ru0YlQsxYWWL1NO c8JbYnCwDYfxZzriBT6a6Q5R0J1lkM/JvwFXqpsfjZZE7QSfljqlh7R9ghcF3Z5Bc5AI 8g+0gjMu90ZrGCH1CbKc9w1Qt3zSCtpiZhocLij2tCYEJ1ZtsS40OUdL5luLcKoXfoNQ f0lA== X-Gm-Message-State: ACgBeo1PLaX31Fqu0scJDNPVOaPW0rTjSPghA/wWdRtMbLD5mVGDPOaF j7HBKktZGcUOSTOlsbP/mG7No+2YpZ1Opg== X-Google-Smtp-Source: AA6agR5AgF7ANuKI2U1i1neMtiwr6Bc418sqNZ2DT+t25V+ZNOOT2AOk9RRxzyhPe9z85yPgvoH61Q== X-Received: by 2002:a63:5d4e:0:b0:41d:2966:74e7 with SMTP id o14-20020a635d4e000000b0041d296674e7mr10562494pgm.526.1659983595590; Mon, 08 Aug 2022 11:33:15 -0700 (PDT) Received: from localhost ([50.221.140.186]) by smtp.gmail.com with ESMTPSA id d15-20020a170903230f00b0016d1b70872asm9181058plh.134.2022.08.08.11.33.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Aug 2022 11:33:15 -0700 (PDT) Date: Mon, 08 Aug 2022 11:33:15 -0700 (PDT) X-Google-Original-Date: Mon, 08 Aug 2022 11:33:13 PDT (-0700) Subject: Re: [PATCH] RISC-V: Remove R_RISCV_GNU_VTINHERIT/R_RISCV_GNU_VTENTRY In-Reply-To: <20220808172742.vlbb5hpr7yqh5led@google.com> CC: Kito Cheng , schwab@suse.de, kito.cheng@sifive.com, binutils@sourceware.org From: Palmer Dabbelt To: binutils@sourceware.org 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=-5.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: Mon, 08 Aug 2022 18:33:20 -0000 On Mon, 08 Aug 2022 10:27:42 PDT (-0700), binutils@sourceware.org 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. Given the age I'm assuming LLVM never supported this on RISC-V either, so this seems reasonable to me. IMO we can't re-use the relocation numbers, so maybe we should leave some sort of deprecated stub in there just in case? Not sure that's even worth it in this case, though. >>> $ 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.