From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) by sourceware.org (Postfix) with ESMTPS id 114443857000 for ; Mon, 8 Aug 2022 17:27:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 114443857000 Received: by mail-qv1-xf35.google.com with SMTP id l8so2150115qvr.5 for ; Mon, 08 Aug 2022 10:27:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=rLxYDQw+ixx+pidu55Ya3M8yohLCMPcOlqaS3b9SnNk=; b=4cjyt3PH/gAcRDpi6uOa4Qjt3t3VyPzJd/R/1yFoR2ktD4Ru7Si+DMGtEsEBpR8aPs 0SwFAV9WXZYVfDDCz8BDH3O4ZgnO0SLJgRt84lCE728n7pgfQfK6B2EhWhsGwaSoXJ8c 4TxbsWBGLMTVkKZmZN5AuGzFNM5QJxjFF2B6hl7OFZaNc1SGFM3GZfEYpjOsGFo8lHzP j+49sbcTW2sRFJroBo79kKgZLyfhkh4DoSRoXnmamde169kEK2opvegEXHYfurZcQYuh x0tXKT2HEbscOXvkZddcR+NYpgUCplsealrXcf6WeJuYEZYJIr9LljEyJVq7YDW9e6U3 Ms6A== X-Gm-Message-State: ACgBeo3c2Ar/6qTB/bY8KsMz2XzgD+66hD0uXho8nla6WX9/BZOBGAv9 oHDVaU/n9vI1UTgXL9447ycMCN8PBLU/Fw== X-Google-Smtp-Source: AA6agR7E5MpdJvWvoSE/KiwUxh3k8SHM+ZT5D+YGqiBLGBB0Gw19rVtqhcY6gNjN7I33JeJ/iHW7gg== X-Received: by 2002:a17:902:f211:b0:16e:f6c2:3742 with SMTP id m17-20020a170902f21100b0016ef6c23742mr19163136plc.58.1659979667340; Mon, 08 Aug 2022 10:27:47 -0700 (PDT) Received: from google.com ([2620:15c:2ce:200:bab6:334a:f9d5:62ba]) by smtp.gmail.com with ESMTPSA id t15-20020a170902e84f00b0016dbe37cebdsm9050056plg.246.2022.08.08.10.27.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Aug 2022 10:27:46 -0700 (PDT) Date: Mon, 8 Aug 2022 10:27:42 -0700 From: Fangrui Song To: Kito Cheng Cc: Andreas Schwab , Fangrui Song via Binutils , Kito Cheng Subject: Re: [PATCH] RISC-V: Remove R_RISCV_GNU_VTINHERIT/R_RISCV_GNU_VTENTRY Message-ID: <20220808172742.vlbb5hpr7yqh5led@google.com> References: <20220808065523.18152-1-maskray@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-17.8 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, FSL_HELO_FAKE, 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=no 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 17:28:00 -0000 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.