From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) by sourceware.org (Postfix) with ESMTPS id B610A3858D32 for ; Sun, 15 May 2022 11:52:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B610A3858D32 Received: by mail-oi1-x22b.google.com with SMTP id i66so15439670oia.11 for ; Sun, 15 May 2022 04:52:54 -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=09VErZnEu7lU4KQWL+lGdA7hYPpKj07jRFy2sWex4cQ=; b=bysvGVeR7B4sLGjKllac/+M17QhG3PW5vl8fb3NYyWe9eJ7RRuDeaww/R0KXaYHoZn 1f9dZtq+iMvagOouFPoeFJIjN+2WbBA7f8AJM6W178BhZTCFl7jjkwXBnNGtf2IbpR4M t0HOSAwP/byPvdrseyLoA0rhYKeuQTmEJunEobEElRDu9EmvU0zDb3eQ2TblsAPh1i3s 2XipJAhKegIJgozGqchk0Ekvk1oHEALLx2iYTCefxbpo69IC2EaoQ0AdUiqj6Cq8xp5j oBc+umdY4OfG7LbHQwkzCJv48o/IfscKgmHosydXDO/w9baASQ0O1Nmv+E7yUozm6Rpe 6qBg== X-Gm-Message-State: AOAM530yYckckyWzCO7nCZz97aKgSbZXjElmh/bkQ/L9PN0K/Y0DUfN9 RIY5Z2IlvmI2+HS/CyUNWQhHhyxqBO09TmxQe9o= X-Google-Smtp-Source: ABdhPJxQX97GPkfTDn7Ehor3wdaP5wy2SIlncuY/8Mnlwov+a8RAVVaIKmxSOQCwtnFsuHPQMmP+//IzK78G7o21EGw= X-Received: by 2002:a05:6808:120c:b0:325:731e:923 with SMTP id a12-20020a056808120c00b00325731e0923mr10792248oil.155.1652615573979; Sun, 15 May 2022 04:52:53 -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> In-Reply-To: From: Rui Ueyama Date: Sun, 15 May 2022 19:52:42 +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.0 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: Sun, 15 May 2022 11:53:00 -0000 On Sun, May 15, 2022 at 7:37 PM Alexander Monakov wrote: > > On Sun, 15 May 2022, Rui Ueyama wrote: > > > > Can you simply restart the linker on first call to get_symbols_v2 instead? > > > > I could, but it may not be a safe timing to call exec(2). I believe we > > are expected to call cleanup_hook after calling all_symbols_read_hook, > > and it is not clear what will happen if we abruptly terminate and > > restart the current process. For example, doesn't it leave temporary > > files on disk? > > 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?