From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cross.elm.relay.mailchannels.net (cross.elm.relay.mailchannels.net [23.83.212.46]) by sourceware.org (Postfix) with ESMTPS id B3BC3383A617 for ; Mon, 23 May 2022 13:02:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B3BC3383A617 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id C53B9761728; Mon, 23 May 2022 13:02:17 +0000 (UTC) Received: from pdx1-sub0-mail-a306.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 5F302761110; Mon, 23 May 2022 13:02:16 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1653310937; a=rsa-sha256; cv=none; b=j7wxqIKZfdcaCkV+ES+RxOYBVtv1uJkAGL8UPQhXv0mRIT+4cidNb/Okyx7GCol0NEYz44 PRNjpUTqS+xbwh1K1/dx3X+M8uKgckERHsAOkhwnsr+tir1wfN1m4sz8uassHM9oOUGqta ODEYi3F+x9D2FWXr67Cw2rhnLwLqbs3lTf0uDPDT/PQ5NROjBEyAyej3wgNIJzhVCm6pZQ bgmVOPuoTbs9YmDV6DbUVNjcLWals0csr6a6I1gwwKTXeB4cvMXfQC1eGDg/jnqJjEmcfs CBPGiQw3sW3Io5bNZ1F3XwHff1rWC9CmmsLfCGb+rFUq97xb5jRFVqMqzDfcNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1653310937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=SYLgzKwATVEhecEqVw0ZyPKlUoH9mIjxnDQcbghdqQg=; b=DVgldU3c7ykGbsrq3XwaiFKlMjNDob9c9MDAWCVfBIuomBqwuS3rK44B7pxCcRZgkHbd5t p79iSmlbiOV5O7i4ycyrt1tt8/wN+2NdmDKawQuBK0wy6476+A9M/xDuw/FvfIQrQkVVbn s+rbT5bseB6W4saCGoBj/CrFJfOdRUbql+m4/V7OypBjPq6XbJ5ERhnVynADHShE3eyO4W W2qkZ071ds8bWXJTjX5EKmSjoPAsFE+LXifqayrDPy+dQNhsFjqqs9QuEPLzqL9E6+P/Ak uDAaUR/ZywbKxK3WTcPelV0oXf/alPYrkCpJdcsT1uh8t/cuTMZ139t+il1NOw== ARC-Authentication-Results: i=1; rspamd-696cff8778-vwsbz; auth=pass smtp.auth=dreamhost smtp.mailfrom=siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-White-Shade: 1269a7f77d1f656a_1653310937362_221160320 X-MC-Loop-Signature: 1653310937362:2204232895 X-MC-Ingress-Time: 1653310937362 Received: from pdx1-sub0-mail-a306.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.127.95.72 (trex/6.7.1); Mon, 23 May 2022 13:02:17 +0000 Received: from [192.168.1.174] (unknown [1.186.122.203]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a306.dreamhost.com (Postfix) with ESMTPSA id 4L6HY175Tsz2c; Mon, 23 May 2022 06:02:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotplt.org; s=dreamhost; t=1653310936; bh=SYLgzKwATVEhecEqVw0ZyPKlUoH9mIjxnDQcbghdqQg=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=wrHWPgQDW3HX00n0jB8i8rKpmdCqte1urD/iN09PFPUP0qInnL2Vopt/ibHPT/cHK utFMMm+jVk9ZBK57F6vC3BF/ApkxSxsdjapZvPRetM6zsirhhz7XKcShjCmIS46gvL mkd35wSO1QCiiXaoC/bAZWaNFmFWyyzMH9TRo+1LjKOyTPowzJToYLeuY5NNegxuSm M0Jp4ATvYUM2xWeXUuDv5rSpUowSvRR4QFIP1kg2rwcLyaD3Iz5DYToq937Wfxr3hu f7q3IEhgy4ppEyA9bCm5pUvr382TUy2hh8QAN5fXVfZ2kgBZCzYgTEA6aQ+mm5+rIw tRg2wK+D3ip6g== Message-ID: <92df96d2-1e71-53eb-7878-636f52913d07@gotplt.org> Date: Mon, 23 May 2022 18:32:08 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH v3] elf: Rewrite long RESOLVE_MAP macro to a debug friendly function Content-Language: en-US To: Adhemerval Zanella , Fangrui Song Cc: Nicholas Guriev , libc-alpha@sourceware.org References: <20220514224849.d7isxwcxnxoo3jhc@google.com> <20220522222425.hk5vde2erkyadxol@google.com> <94dbef38-5719-13f6-43a1-9a63367e217e@linaro.org> From: Siddhesh Poyarekar In-Reply-To: <94dbef38-5719-13f6-43a1-9a63367e217e@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3031.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SBL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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: , X-List-Received-Date: Mon, 23 May 2022 13:02:25 -0000 On 23/05/2022 18:05, Adhemerval Zanella wrote: > I think the main issue is we build glibc with -fgnu89-inline, which is required > due some optimizations where a function is defined without inline, but then > it has an inline definition to be used internally. I'm not sure I understand, could you please elaborate? > Also, since we don't use -Winline we can't assure that compiler won't emit the > function definition where gcc documents it might [1]. So I think one exercise > we might do it to remove all __always_inline__, and add -Winline to see which > functions, if any, won't be inline by compiler. How would that help though? That output is bound to change as the compiler or even the code base changes since the decision to inline (when __always_inline__ is not specified) is determined heuristically. In my understanding, the point of __always_inline__ use in the sources is to make inlining deterministic. > I would like also to eventually remove -fgnu89-inline, since I think we can > restructure the code to not rely on extern inlines nor on the internal inline > optimizations. Also, it seems that although clang seems to support > -fgnu89-inline, it has subtle different semantics that breaks some internal > glibc assumptions. Could you elaborate on this too? Thanks, Siddhesh