From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk1-xa2e.google.com (mail-vk1-xa2e.google.com [IPv6:2607:f8b0:4864:20::a2e]) by sourceware.org (Postfix) with ESMTPS id 171E63857000 for ; Tue, 9 Aug 2022 19:32:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 171E63857000 Received: by mail-vk1-xa2e.google.com with SMTP id t64so367038vkb.12 for ; Tue, 09 Aug 2022 12:32:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=nno7053zz90KaAJcX+zQGnWXPII2wNVFpaONRAuQEV4=; b=W7kWFxPPXbcyKRm95NdqB1vMWO8aACKhWUuhtJ/UytxymQb4IxQ3cR7ZFOzvK3otz7 6lPaRIkbrugUe4dEiA7h5neHAz0pwMyc06OFkr3mrrIlS3Brv/G1x9m6aU9Ub2NNOQTq aeh5WxoUEi56TJ/vZNR3SPO5UL9DTe3GdQ4gAvNHWgOCBKle8t+jqpN6z+nz/4nDyIwG BfDSFrruj1f3cPaT6k8LcgdSc776cYnuCkeCysH1WAlMyffSXmBLMPqJGq0LIs5IY+Tf gNddW778wQtF3lPiL4Qrp2krWezNZlZ9xQSNpb9zqZ7ji7dhnda2Cb/cJqhtpC2DD70e Jpqw== X-Gm-Message-State: ACgBeo0BdMr+0Xls+qk1NQ2upLf+mP1cA3ZURSe1bZzGbbxAPnEx0Ikd vY1+g8aGf3GhR0kf0sZL2g72vAixhvLLRA== X-Google-Smtp-Source: AA6agR74FHuMq3sgQT0VMCAi3xxh2kHeARoKn2XoCghFTGKA1vaUzPvOU8p1Uj4wJ/5s5z9giK3Kew== X-Received: by 2002:a1f:32c9:0:b0:377:afb0:23c3 with SMTP id y192-20020a1f32c9000000b00377afb023c3mr10008633vky.6.1660073565403; Tue, 09 Aug 2022 12:32:45 -0700 (PDT) Received: from ?IPV6:2804:431:c7ca:930b:1501:cb0e:82b0:65e1? ([2804:431:c7ca:930b:1501:cb0e:82b0:65e1]) by smtp.gmail.com with ESMTPSA id s63-20020a1f5e42000000b00378a8a78a03sm8544762vkb.31.2022.08.09.12.32.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Aug 2022 12:32:45 -0700 (PDT) Message-ID: Date: Tue, 9 Aug 2022 16:32:43 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.1.1 Subject: Re: [PATCH] elf: Remove -fno-tree-loop-distribute-patterns usage on dl-support Content-Language: en-US To: "H.J. Lu" Cc: GNU C Library References: <20220808200021.763123-1-adhemerval.zanella@linaro.org> <8edb1934-df86-6956-b90c-16032ff67df9@linaro.org> <9e01cc4b-7acd-5719-6615-8fb3cb6bf80b@linaro.org> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: 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 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: Tue, 09 Aug 2022 19:32:48 -0000 On 09/08/22 16:06, H.J. Lu wrote: > On Tue, Aug 9, 2022 at 11:48 AM Adhemerval Zanella Netto > wrote: >> >> >> >> On 09/08/22 15:31, H.J. Lu wrote: >>> On Tue, Aug 9, 2022 at 5:11 AM Adhemerval Zanella Netto >>> wrote: >>>> >>>> >>>> >>>> On 08/08/22 19:16, H.J. Lu wrote: >>>> >>>>>> --- a/sysdeps/x86_64/multiarch/memset-evex-unaligned-erms.S >>>>>> +++ b/sysdeps/x86_64/multiarch/memset-evex-unaligned-erms.S >>>>>> @@ -44,4 +44,7 @@ >>>>>> >>>>>> # define USE_LESS_VEC_MASK_STORE 1 >>>>>> # include "memset-vec-unaligned-erms.S" >>>>>> +# if !defined NO_MULTIARCH && MINIMUM_X86_ISA_LEVEL >= 4 >>>>>> +strong_alias (__memset_evex_unaligned, __memset_generic) >>>>>> +# endif >>>>>> #endif >>>>> >>>>> This will define 2 __memset_generic for -march=x86-64-v4. >>>> >>>> Are you sure? Check with a x86_64 build with -march=x86-64-v4 I am seeing: >>>> >>>> $ readelf -Ws string/memset*.os | grep -w __memset_generic | wc -l >>>> 1 >>>> >>>> And it is indeed provided only by string/memset-evex-unaligned-erms.os. >>> >>> You are right. Since dl-symbol-hacks.h defines memset to an alias, >>> should it be moved to sysdes/generic and each arch can provide a >>> suitable alias? >> >> The dl-symbol-hacks.h is meant to be used solely by loader code (that's >> why I have added to elf/), but I don't have a strong preference. > > The default should be no alias. Only IFUNC targets need to define a > proper alias. Alright, although I added the alias on all targets to avoid adding another hook to specify whether memset is implemented by IFUNC (to enable the symbol redirection instead of use the default symbol name). I am not sure if making arch-specific will simplify the required code here.