From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) by sourceware.org (Postfix) with ESMTPS id 943E93858404 for ; Wed, 7 Jun 2023 12:08:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 943E93858404 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-19f675022d8so6061860fac.0 for ; Wed, 07 Jun 2023 05:08:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686139734; x=1688731734; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=+X7SWO3rSKyYo6ggMMYNgBIQf//j1gvF52sUp8sPyjE=; b=hYQyUrTJqM2nMb56OXX0L5O7EMwmJn5XKSgNywyCJKajsxhSXTa3VKiErDp5N7tCYP ADTuZbSvoLjSqoiWLEq8C4WMCTVgoIQWajIFVdm96XQj50isJ8ezVnlf6cr20o7oiEXR Qyn4FGb0MGvBBjbIMOwFZVr+obfd7WyaF+emeDsxBo9jub8eEWvbkF8du79a5Ik7I6MV rI6MCXlk1dH3QpC4Gt5FvI8WB+WHUOrInuURMAU1YZNBPHA+KUIN0bkSY4n9G0SZ/lNj fBaageaZ89qbnUJ07w+nien2d1O+JQ0kgobjN5r7YSyz0fccRJnPxlQjTtubVLUK//hU AMnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686139734; x=1688731734; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+X7SWO3rSKyYo6ggMMYNgBIQf//j1gvF52sUp8sPyjE=; b=ERm+aXR/0dpCIL4O7yHSFzu1GoLQVPpOu4B76aSx9v0rlGOct+Za2pvtxvUQmOp7mN AGSXgKjgTcHylnDBoctZbFibwR8FGW5BdwCBdWMnH4LwAwH4UttK6Bb6MI4KvrbufTxN +s90sPwEJ5MjA7P9s5PdjxWkgOhs8VVVfWbILm41AUVBZ/QWP024DXxyihfqDvo+qgD5 FU4TtsgrHMHJH+Vvzlv6Ak3nX4p5T2cM6sHjqd29JPOnNaSEXT74IlIHT8k7Tl3SrRsx ftfTNiWfhgklyAJdhnbWTAV9doROvsbC7UtB8xaJMYl3wRciTMlYkBQv1UlvlSPXc6BW VqvA== X-Gm-Message-State: AC+VfDyeLWJms4U0utGfTBIDc0FoAe1KZxihE7g/6VcAIEHpdaS7Iqae Azt6+wDmpATjC/BNZ4YLZmZBdw== X-Google-Smtp-Source: ACHHUZ4AcvpU+kVURrIZcBWj5tNeM4KgrW5a3EgujH/FijeCVQVEiXyao8nc7BRaXbjhZ8kB6flAIA== X-Received: by 2002:a05:6870:954b:b0:19f:adb4:1c6e with SMTP id v11-20020a056870954b00b0019fadb41c6emr2794527oal.42.1686139733965; Wed, 07 Jun 2023 05:08:53 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c1:fe49:e029:57a8:7e86:fdae? ([2804:1b3:a7c1:fe49:e029:57a8:7e86:fdae]) by smtp.gmail.com with ESMTPSA id w22-20020a056870431600b0019ea8771fb0sm5745076oah.13.2023.06.07.05.08.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Jun 2023 05:08:53 -0700 (PDT) Message-ID: <36c738dd-46bd-20c5-db4e-a91646b193c5@linaro.org> Date: Wed, 7 Jun 2023 09:08:50 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: _rtld_global, _rtld_global_ro (and local aliases) as an optimization Content-Language: en-US To: Florian Weimer , Andreas Schwab Cc: Florian Weimer via Libc-alpha References: <87bkhs9491.fsf@oldenburg3.str.redhat.com> <69f6c69b-52c2-fe57-ed48-3d80b83576ac@linaro.org> <8735338xb4.fsf@oldenburg3.str.redhat.com> <87cz277gw2.fsf@oldenburg3.str.redhat.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <87cz277gw2.fsf@oldenburg3.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 List-Id: On 07/06/23 06:37, Florian Weimer wrote: > * Andreas Schwab: > >> On Jun 07 2023, Florian Weimer via Libc-alpha wrote: >> >>> As a concrete example, we could turn GLRO(dl_dso_sort_algo) into >>> >>> static int dso_sort_algo; >>> >>> in elf/dl-sort-maps.c because it's not used outside the file. >> >> I think it was just a mistake to put it there initially. None of the >> definitions related to the DSO sort algo (except _dl_sort_maps_init) >> need to be visible outside that file. > > We have more cases that are somewhat similar, where we could use an > extern attribute_hidden variable instead of a struct member. What about > those? I think it makes sense to cleanup the _rtld_global/_rtld_global_ro variables, as Andreas has put there are multiple examples that we shouldn't had to update it.