From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) by sourceware.org (Postfix) with ESMTPS id 9DD273858D37 for ; Wed, 5 Oct 2022 17:22:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9DD273858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qt1-x833.google.com with SMTP id cj27so10288944qtb.7 for ; Wed, 05 Oct 2022 10:22:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=3EMKsk/sCe8y/dbE7z2gqS6c2hjHSs4dRi44S+Qf5xY=; b=pU4qCEeqde1W7Llgb8A6FLrfVwbVyV95Dn2wKO4ubRpowKQcQPcYQ4syB60eYTSuRB TYRtuKETdFrUyzPBpZZwrmMIGcI8J3CoLdm8LwGYw7vSF42TqqL9fseHV7FTm7GPgRAr /vyjQUbFYe/btbI6NRALOOxZFSbmkf2hvmH/bLaGX6Qx3zxmMhck1mnnVlr10FR9YgiC WTsAPGCZvGQke4n72K14PzhcwGD3snrdfAIqpaPrr0+OkA+Rb3mM9JCDTuMzUdw7Fly5 Ehfg+6MGRMnKc/9oSQ5XaS8VXlenhKAYOvdRKRiLBBYc7gduZtcIL2ETPhXRpB4DNrCS MnzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=3EMKsk/sCe8y/dbE7z2gqS6c2hjHSs4dRi44S+Qf5xY=; b=fkxVqRho5IZD2usRtmR1gXTzdBbESotCWtUk3kyV9pmCUNucKbELG4N+ALRxtmrKpK 90FHSuJqR5tcuzuFdkKs53sHLkv7hn38Hc8xYdu/OOJtGNfTmwqNorIOt5SDwB7PH/cR FMHGDiWquAyCHAt3XfEGCuqu/5LFK9EoPYD/m5NBuH0d4KjfL5J/ceEa3MM7nfMGoX3H ToT5LYPTjqL5L1KP0BiW9KUP7Gkjw9oi4yhPXx7xhv8tYqiVVklGEs+xYO/1QZ2spjvB EBAhdSiYmZgz68Ub9MaeMjflSwduPxODnqxZpP/TKclGWpw7IQj+BBX+qwaT25nkZh0f PNhA== X-Gm-Message-State: ACrzQf1EbcUDc1IRrNik3Nx4rhNa52WcYFGIUzYUrv5F6IRX8+A99b78 4APIhIGvwB+0lEVt2er8p23xCiHbxWhHPXMSEG0= X-Google-Smtp-Source: AMsMyM4hRS2dFOYRjquDd04vmaKwgldtqVLgoUinYJXwv0fqeZJsmQCGqXPCgq9eduTKpCPJATMqebmlqNuMS13RY+o= X-Received: by 2002:a05:622a:511:b0:390:3339:935b with SMTP id l17-20020a05622a051100b003903339935bmr472826qtx.437.1664990548845; Wed, 05 Oct 2022 10:22:28 -0700 (PDT) MIME-Version: 1.0 References: <20220921135108.3324737-1-adhemerval.zanella@linaro.org> <20220921135108.3324737-7-adhemerval.zanella@linaro.org> In-Reply-To: From: "H.J. Lu" Date: Wed, 5 Oct 2022 10:21:53 -0700 Message-ID: Subject: Re: [PATCH 6/6] x86: Fix -Os build (BZ #29576) To: "Carlos O'Donell" Cc: Adhemerval Zanella , libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3023.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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 Wed, Oct 5, 2022 at 7:10 AM Carlos O'Donell wrote: > > On Wed, Sep 21, 2022 at 10:51:08AM -0300, Adhemerval Zanella via Libc-alpha wrote: > > The compiler might transform __stpcpy calls (which are routed to > > __builtin_stpcpy as an optimization) to strcpy and x86_64 strcpy > > multiarch implementation does not build any working symbol due > > ISA_SHOULD_BUILD not being evaluated for IS_IN(rtld). > > Ohhhhhh... that is interesting. This changes the strcpy used in rtld for > all x86_64 build options, and I'm going to ACK this, but we may need to > revisit this if it shows up in a profile. Will this lead to both strcpy and stpcpy in ld.so? Currently there is only stpcpy in ld.so. > CC'ing HJ here in case he wants to comment as a machine maintainer. > > LGTM. > > No regressions on x86_64. > > Reviewed-by: Carlos O'Donell > Tested-by: Carlos O'Donell > > > Checked on x86_64-linux-gnu. > > --- > > sysdeps/x86_64/multiarch/rtld-strcpy.S | 18 ++++++++++++++++++ > > 1 file changed, 18 insertions(+) > > create mode 100644 sysdeps/x86_64/multiarch/rtld-strcpy.S > > > > diff --git a/sysdeps/x86_64/multiarch/rtld-strcpy.S b/sysdeps/x86_64/multiarch/rtld-strcpy.S > > new file mode 100644 > > index 0000000000..19439c553d > > --- /dev/null > > +++ b/sysdeps/x86_64/multiarch/rtld-strcpy.S > > @@ -0,0 +1,18 @@ > > +/* Copyright (C) 2022 Free Software Foundation, Inc. > > + This file is part of the GNU C Library. > > + > > + The GNU C Library is free software; you can redistribute it and/or > > + modify it under the terms of the GNU Lesser General Public > > + License as published by the Free Software Foundation; either > > + version 2.1 of the License, or (at your option) any later version. > > + > > + The GNU C Library is distributed in the hope that it will be useful, > > + but WITHOUT ANY WARRANTY; without even the implied warranty of > > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > > + Lesser General Public License for more details. > > + > > + You should have received a copy of the GNU Lesser General Public > > + License along with the GNU C Library; if not, see > > + . */ > > + > > +#include "../strcpy.S" > > OK. Uses Makeconfig:sysd-rules-patterns to capture rtld-*. > > > -- > > 2.34.1 > > > -- H.J.