From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2b.google.com (mail-oa1-x2b.google.com [IPv6:2001:4860:4864:20::2b]) by sourceware.org (Postfix) with ESMTPS id 195AF3858C50 for ; Mon, 16 May 2022 02:41:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 195AF3858C50 Received: by mail-oa1-x2b.google.com with SMTP id 586e51a60fabf-ee1e7362caso18239154fac.10 for ; Sun, 15 May 2022 19:41:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=g/nET8U10EqRTkl0899aByn5o1dPRTGbIqkvKPuoUpQ=; b=KaVbRxyedY6XT6jVbmwQz++X2vXaw88QLt3GeteoEmcvEk+QZ9AVjEjBAsld2axuKT Auu1uCNOS1gNlvVLvUSshsQAc96DRReQCj1tLWmfr8WobLbak6MPT8Eh26MFI1aJgde0 iBKyVG0YnIvo+herqLiOfS+RnvOV+QjAmazsbOVTQG0Sn7x9IfGEYNxy/RAxbX9MzXPI i/+IDfdT9yE+u4PFkx2ToVdlFQfIiI/UVHO0SfojSVuthywIsstyxtHyp7jmZvfuqiec /qfz6YupYbEfyXeb9/qKIQ78p2TrlXKT9Gao/0E9FHNLU5tt3QCVAC5I8XEuVrYaN91F fx9A== X-Gm-Message-State: AOAM533N+CWrk6qD19zh6GUuAiD9f6wwYAT6RjFKVUgUFGRnHWuS8jkX mlnIMtm0q+B0iu6TprgWKMgS+H8bRuC1OKeGZiY= X-Google-Smtp-Source: ABdhPJwWZdFi+l2U10Eg65wHWatzwdc5ZQUlXtlWzsTw1g0h06ZXTYvkny71GszUTQxEylue0/ekQ4ooRr4OyBmr5aY= X-Received: by 2002:a05:6870:612a:b0:ed:a58f:eaf7 with SMTP id s42-20020a056870612a00b000eda58feaf7mr13998171oae.0.1652668874181; Sun, 15 May 2022 19:41:14 -0700 (PDT) MIME-Version: 1.0 References: <63633ead-aa7e-c424-9851-ac332ac13df3@suse.cz> <80f37f2-efdf-673-a8f4-69f2d5842ea2@ispras.ru> <9de185b3-914-8522-7eb-40b802d4651@ispras.ru> <7788e58e-ce41-d25b-eefe-5f9c966a2ff2@ispras.ru> <97c39ec3-33f-36e1-ebd7-498e3772c9a3@ispras.ru> In-Reply-To: <97c39ec3-33f-36e1-ebd7-498e3772c9a3@ispras.ru> From: Rui Ueyama Date: Mon, 16 May 2022 10:41:03 +0800 Message-ID: Subject: Re: [PATCH] lto-plugin: add support for feature detection To: Alexander Monakov Cc: =?UTF-8?Q?Martin_Li=C5=A1ka?= , GCC Patches , Jan Hubicka Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, 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: 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: Mon, 16 May 2022 02:41:16 -0000 On Sun, May 15, 2022 at 8:07 PM Alexander Monakov wrote: > > On Sun, 15 May 2022, Rui Ueyama wrote: > > > > Regarding files, as far as I can tell, GCC plugin will leave a 'resolution file' > > > on disk, but after re-exec it would recreate it anyway. > > > > Does it recreate a temporary file with the same file name so that > > there's no temporary file left on the disk after the linker finishes > > doing LTO? > > Resolution file name is taken from the command line option '-fresolution=', > so it's a stable name (supplied by the compiler driver). If it is a guaranteed behavior that GCC of all versions that support only get_symbols_v2 don't leave a temporary file behind if it is suddenly disrupted during get_symbols_v2 execution, then yes, mold can restart itself when get_symbols_v2 is called for the first time. Is this what you want? I'm fine with that approach if it is guaranteed to work by GCC developers.