From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id B4BAE3858C53 for ; Wed, 4 May 2022 15:06:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B4BAE3858C53 Received: by mail-ej1-x629.google.com with SMTP id m20so3427550ejj.10 for ; Wed, 04 May 2022 08:06:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Q4A2kLK24MwQiPkTVqFfjYAXA1gkqGeBTiv0pKo+BuY=; b=115Va737dbVd1qDM8vUuFRPX2w+jOu5ILeehqS4fosGHLwTu4ByA29h9EoojFrTsQP piATCXt8JZ67rGsN5N9gxiDd1d9WHYGBvEf3Z4LokXTtfUlFvL7POdzE6fpPXxDg6+TK +Ek7nX5hvKbSXVmrYKNA/+N2txIUsVo1UMtDU/0xeSjmvFJ5k3jGA+eYIeZq5oupzUwg Gb0VGuvQ5tZj3I62cqQr3aeV4edGXCz9Om8fqV+VTYSJV9esH25POUIWLWdvZmT+ou/i 0WdWYAuLzuJ9geouRTtjEN2wM0/becXBSQSorIZSlx5hHp8Vc7lFhvBteuaqVNf21AQN xdKw== X-Gm-Message-State: AOAM533r8dfxxANB79XQLeSzyOhxlhYdUClZAQSkzcm1IW+sJlScb4eK i65KZEmgS4MIW1xHIIkkeJI= X-Google-Smtp-Source: ABdhPJySWxB+c5bg3j4dNwTTLb9iPPIRCQhA8FdlgDWTiY+y1mnasSXoq2FTu+Ms4uVOXDpA+Pcjiw== X-Received: by 2002:a17:906:4fd5:b0:6f4:2704:1edf with SMTP id i21-20020a1709064fd500b006f427041edfmr18495235ejw.136.1651676770432; Wed, 04 May 2022 08:06:10 -0700 (PDT) Received: from nbbrfq (80-110-214-113.static.upcbusiness.at. [80.110.214.113]) by smtp.gmail.com with ESMTPSA id w6-20020a170907270600b006f3ef214dcdsm5860426ejk.51.2022.05.04.08.06.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 May 2022 08:06:10 -0700 (PDT) Date: Wed, 4 May 2022 17:06:07 +0200 From: Bernhard Reutner-Fischer To: Martin =?UTF-8?B?TGnFoWth?= Cc: rep.dot.nop@gmail.com, Alexander Monakov , gcc-patches@gcc.gnu.org, Jan Hubicka Subject: Re: [PATCH] lto-plugin: add support for feature detection Message-ID: <20220504170607.3aa4324b@nbbrfq> In-Reply-To: References: <63633ead-aa7e-c424-9851-ac332ac13df3@suse.cz> <27841a42-baef-d53e-c601-ad265030854d@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, 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: Wed, 04 May 2022 15:06:13 -0000 On Wed, 4 May 2022 15:31:32 +0200 Martin Li=C5=A1ka wrote: > On 5/4/22 15:10, Alexander Monakov wrote: > > On Wed, 4 May 2022, Martin Li=C5=A1ka wrote: > > =20 > >> On 5/4/22 14:32, Alexander Monakov wrote: =20 > >>> On Wed, 4 May 2022, Martin Li=C5=A1ka wrote: > >>> =20 > >>>> The patch is a follow-up of the discussion we've got in: > >>>> https://gcc.gnu.org/pipermail/gcc-patches/2022-May/593901.html > >>>> > >>>> Mold linker would appreciate knowing in advance if get_symbols_v3 is= supported > >>>> by a GCC plug-in or not. =20 > >=20 > > Out of curiousity, I looked at mold, and I don't understand what proble= m this > > detection is solving, nor why this is the best way to solve that. Was t= here > > some discussion with mold author I should check out? =20 >=20 > Sure, please take a look at this issue: > https://github.com/rui314/mold/issues/454#issuecomment-1116849458 >=20 > >=20 > > Note that mold takes this not only as 'v3 API is supported', but, more > > importantly, as 'v2 entrypoint will not be called'. =20 >=20 > Yes, if they register get_symbols_v3, then it will be called. That's how = the > plug-in works. FWIW, I usually use an alias to some existing, exported symbol, like: /* Announce that we are GPL. */ #if defined __GNUC__ extern __typeof (plugin_init) plugin_is_GPL_compatible __attribute__ ((alia= s ("plugin_init"))); #else unsigned char plugin_is_GPL_compatible; #endif