From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id DA3D53856DF5 for ; Thu, 5 May 2022 12:50:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DA3D53856DF5 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 07E0D219BD; Thu, 5 May 2022 12:50:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1651755038; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6GGVqNRfy5H3EwjvT5RwYYc3zrMFvCbgdm6KEogWjZw=; b=gOP0dnwQGwD/DQtn1aDfqW35SEnBllT6c83CUWACOq5MGC+lbKYg145C1RtZyYBUabQX6H X7Sr9NpPHXrgELhyzdib48oHGlguOJ7SncfpeG65hjvzmHazq0m8hg2xAKVesq2moVbDYO 1fGgeSqI8QAx1ltSQV6W3iuVtxuze/U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1651755038; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6GGVqNRfy5H3EwjvT5RwYYc3zrMFvCbgdm6KEogWjZw=; b=Zt5pAjnXODPaxUvF3mhTy193bLJWhrzjRQshu5fOp2bO58eIWGTmfEdisqa1GGlbqGO4ip EU+eniRm9ZdaiTBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id DF93713B11; Thu, 5 May 2022 12:50:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id NJqdNR3Ic2KyCwAAMHmgww (envelope-from ); Thu, 05 May 2022 12:50:37 +0000 Message-ID: Date: Thu, 5 May 2022 14:50:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH] lto-plugin: add support for feature detection Content-Language: en-US To: Alexander Monakov , Richard Biener Cc: GCC Patches , Jan Hubicka References: <63633ead-aa7e-c424-9851-ac332ac13df3@suse.cz> <27841a42-baef-d53e-c601-ad265030854d@suse.cz> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2022 12:50:40 -0000 On 5/5/22 12:52, Alexander Monakov wrote: > Feels a bit weird to ask, but before entertaining such an API extension, > can we step back and understand the v3 variant of get_symbols? It is not > documented, and from what little I saw I did not get the "motivation" for > its existence (what it is doing that couldn't be done with the v2 api). Please see here: https://github.com/rui314/mold/issues/181#issuecomment-1037927757 > > To me lack of documentation looks like a serious issue :/ Yes, documentation is missing. This is what can be seen from gold's implementation: // Get the symbol resolution info for a plugin-claimed input file. static enum ld_plugin_status get_symbols(const void* handle, int nsyms, ld_plugin_symbol* syms) ... // Version 2 of the above. The only difference is that this version // is allowed to return the resolution code LDPR_PREVAILING_DEF_IRONLY_EXP. // Version 3 of the above. The only difference from v2 is that it // returns LDPS_NO_SYMS instead of LDPS_OK for the objects we never // decided to include. static enum ld_plugin_status get_symbols_v3(const void* handle, int nsyms, ld_plugin_symbol* syms) Which is something like documentation :( Martin