From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RDNS_DYNAMIC,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id DE2581F8C6 for ; Mon, 13 Sep 2021 16:36:34 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 30D833857421 for ; Mon, 13 Sep 2021 16:36:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 30D833857421 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1631550993; bh=6gvr9tl35Fhve3tvJJ3Lq/F0q49aZI9TESnkj7aUONM=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=LI1UrZB2Rad4wLiXnLaFXs2esFfTzQzJ3abM3rp8aanPvwraXo/0hIMEv//kHdmF6 xgZBb3kB8jy/CBAabNdM5zZir1YjDKmn8b5zmMhQL1vpTGTNvCv8dFAIl/vhbpdkFU BXF36b3vjqYG7JSBZYB/8w1dhzY3luo1zoFH1vuE= Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by sourceware.org (Postfix) with ESMTPS id 9ABB63858002 for ; Mon, 13 Sep 2021 16:36:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9ABB63858002 Received: by mail-yb1-xb2f.google.com with SMTP id a93so21805789ybi.1 for ; Mon, 13 Sep 2021 09:36:13 -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=6gvr9tl35Fhve3tvJJ3Lq/F0q49aZI9TESnkj7aUONM=; b=DWS11EXf7nt3g6PNUa608KjDMB9ReQ+rKj7UQrF1JnUj2csm+OP9YfROG4s668cm2v wn+SXveAuLh7q2vK936ZKCtANdf/i29wSIGkeb1i6tp6mdhLg+UvfDOWJBAXqd4QovgN y0dMyOYQKfYFPfrPS8S4NUE8FS23hL84cpDCu5FmfWtpM8INe2mleumoFTwg4M5FLOlZ J4Ml3TGw4L/yglWsL/CF1nVgG/aGZc6jeMUigZDn2AgX/J06vjD5Jx1dKSW2gThCEhD/ 8vBTo5wWAZmSE7xOCP9KXT0dfiLafoYRkR0E/c+0066Sj6X3ZTA0IKCE8ijAm0jSvcAb eNQA== X-Gm-Message-State: AOAM530I5eh4OTR0ZmOGmK2nm88Brr9W87iVujEO2vXjOecxpP/9kLx3 deli8JcZeN2kdOT7HOsR/VEoDE6bkGECMiAizlDlHt9SGSc= X-Google-Smtp-Source: ABdhPJzBUK9UuCzTrGh5ZopKEDhIgpoC5p849pGuPRoc4NKsGhZfKEetoutO70ah86rPhO3CbCpFgmwfolXlyUxppBg= X-Received: by 2002:a25:5e08:: with SMTP id s8mr16990370ybb.371.1631550973021; Mon, 13 Sep 2021 09:36:13 -0700 (PDT) MIME-Version: 1.0 References: <20210823043648.2648608-1-maskray@google.com> <87tuj255se.fsf@oldenburg.str.redhat.com> <20210904035235.giercjqdwzjukxb5@google.com> In-Reply-To: <20210904035235.giercjqdwzjukxb5@google.com> Date: Mon, 13 Sep 2021 09:36:01 -0700 Message-ID: Subject: Re: [PATCH] elf: Avoid nested functions in the loader (all ports) [BZ #27220] To: Florian Weimer Content-Type: text/plain; charset="UTF-8" X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: =?utf-8?q?F=C4=81ng-ru=C3=AC_S=C3=B2ng_via_Libc-alpha?= Reply-To: =?UTF-8?B?RsSBbmctcnXDrCBTw7JuZw==?= Cc: Fangrui Song via Libc-alpha Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" ping On Fri, Sep 3, 2021 at 8:52 PM Fangrui Song wrote: > > On 2021-09-03, Florian Weimer wrote: > >* Fangrui Song via Libc-alpha: > > > >> [Alternative to https://sourceware.org/pipermail/libc-alpha/2021-August/130340.html > >> This version fixes all ports and doesn't add NESTING dispatches.] > >> > >> dynamic-link.h is included more than once in some elf/ files (rtld.c, > >> dl-conflict.c, dl-reloc.c, dl-reloc-static-pie.c) and uses GCC nested > >> functions. This harms readability and the nested functions usage > >> is the biggest obstacle prevents CC=clang (which doesn't support the > >> feature). > > > >This patch causes elf/tst-nodelete to fail on x86_64, powerpc64, > >powerpc64le at least: > > > >| Unique symbols test failed > > > >I assume something is wrong with the initialization of the new global > >variables. > > I unintentionally missed DL_LOOKUP_FOR_RELOCATE > (fcb04b9aed26a737159ef7be9c5a6ad0994437dc ("Introduce > DL_LOOKUP_FOR_RELOCATE flag for _dl_lookup_symbol_x")) when rebasing the > multi-line macro RESOLVE_MAP. > > Fixed in > https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/maskray/unnest > > (Sorry about my negligence. On my Debian, master has 14 FAIL, and I > probably missed that tst-nodelete additionally failed.)