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: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 C27F81F8C8 for ; Wed, 22 Sep 2021 19:21:52 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 02288385802D for ; Wed, 22 Sep 2021 19:21:51 +0000 (GMT) Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id A6A913858401 for ; Wed, 22 Sep 2021 19:21:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A6A913858401 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: gWeizD3zL2SmJ3XdlnmubtQ5Jixb9baf52X6DMZrnf/7j0SH1nERzJrHMJsoO1KzjPnEXpQ/mF rFnXKr13uwBFtcLOq6nbBzWFYyNzvmPiw5UWl84qgRhkq+fnTJLJTHZ+rzCs1bu3Ja95TAm0Iq an8sjrB2/45hVaV5DEV1kmNbECc07fl0gvzY7td7RaZPtyDEAKLps70aPpeGVqszf9fmKvQPsu GeHKvZDB/i72PKfP2MM3UB6URgi3ZjE9kGt6eQnRyRf8c3IEXxMMvWikIWVYb+OEvzhuaMd6/0 YUkhFjYPtgrfQzckixkHB05Z X-IronPort-AV: E=Sophos;i="5.85,314,1624348800"; d="scan'208";a="66177787" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 22 Sep 2021 11:21:39 -0800 IronPort-SDR: 7BVrcn8Ty7X0Ynhnw7EwYTkQ+ofxH3cZtqw3p0Fw0FyYsDWSwa92LUHTIqv31zjfB7FrMf0HMj DWDdwhhA9kvsccdQa+JQzfutY9QagODaAhx1oc1DRZOI/34eVb9LMHRRIO8V6OBqm5Myi70EUJ nH5reRpL+/PP9GMPsuRlDZZpZrzuWmgTSdRJ9VlYNJDiXeiYKGBLf3g3EloJUc8DDc7GL48ujw 0pVY1tsO3bPhC0oljaKRjIfLIfEGaZqf1IDBfxrQuiSE+9jRlXnFXTWaXJL2qNDOdEMQ8h4zo4 KGQ= Date: Wed, 22 Sep 2021 19:21:32 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: =?UTF-8?Q?F=C4=81ng-ru=C3=AC_S=C3=B2ng?= Subject: Re: PING^2: [PATCH] elf: Avoid nested functions in the loader (all ports) [BZ #27220] In-Reply-To: <20210922184037.7anyorvbtnd5j2fm@google.com> Message-ID: References: <20210823043648.2648608-1-maskray@google.com> <87tuj255se.fsf@oldenburg.str.redhat.com> <20210904035235.giercjqdwzjukxb5@google.com> <96f589db-295c-2a1d-600f-28f9fb4b0eee@redhat.com> <20210922184037.7anyorvbtnd5j2fm@google.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: , Cc: Florian Weimer , Fangrui Song via Libc-alpha Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On Wed, 22 Sep 2021, Fāng-ruì Sòng via Libc-alpha wrote: > I went ahead and filed https://sourceware.org/bugzilla/show_bug.cgi?id=28376 > "[meta] Build glibc with Clang" > to collect miscellaneous small fixes. Note also that issues regarding use of glibc installed headers should probably be handled separately (with a separate meta-bug to depend on them; we already have a few such bugs open, e.g. 26287). The key difference there is that installed headers should support a wide range of compilers, including old versions. Whereas for issues building glibc, the conclusion in some cases may well be that a change should be made to Clang, and only new versions with that fix supported, rather than working around a limitation in existing Clang versions. > About the global variables (cur_*): they are in elf/dl-reloc.c > > - /* String table object symbols. */ > - const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]); > + cur_l = l; > + cur_scope = scope; > + cur_strtab = (const void *) D_PTR (cur_l, l_info[DT_STRTAB]); > > removing them requires more parameters to ELF_DYNAMIC_RELOCATE and > RESOLVE_MAP. > Is that the direction you are imagining? Yes. Explicit parameters (whether individual parameters or in a struct) seems cleaner than using global state to pass parameters. -- Joseph S. Myers joseph@codesourcery.com