From patchwork Sun Mar 19 15:10:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Bugaev X-Patchwork-Id: 1758679 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=K4Mlb0E7; dkim-atps=neutral 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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PfhLN6Vfgz2476 for ; Mon, 20 Mar 2023 02:17:16 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C79C7383F41C for ; Sun, 19 Mar 2023 15:17:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C79C7383F41C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679239034; bh=chWMAC9UUXBhF6BCwf0aNHH+U12GEWzdapM7A6/oqso=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=K4Mlb0E7LdfHRv9u2uh+XLDjxbX94w0s8nvSQx5cwMCJIEQS7t0WrCvBUoSoYZLJ9 GYDVsgPmmf65FHT5UNiXngEH86duV8R0QRgskDzlK/O9cQ3ctlMOIhFNy3QH0Ik0n3 EhkVtdye8GGswUuD5JrYPfOBr8ONpwEs9vvsobLw= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by sourceware.org (Postfix) with ESMTPS id CA9CC3858C2B for ; Sun, 19 Mar 2023 15:11:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CA9CC3858C2B Received: by mail-lf1-x133.google.com with SMTP id br6so12000047lfb.11 for ; Sun, 19 Mar 2023 08:11:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679238676; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=chWMAC9UUXBhF6BCwf0aNHH+U12GEWzdapM7A6/oqso=; b=8HVAS7J3PBbztopcX3sTL5XTkMU3nDgZyXz7azI64RpKvfGLY+7k71oW9erdUpsyV1 JJTW2MHNQbi1O9Jig5xRF09BpRPmJOkCE2ZAhSMjzpmUwDSuGR9F1QedWcu09RBMDbN3 bQcfW2sRJfx5gf3SZwDjWb4/o8FU5e/reRRT2vJ0yQO579KiKgp0bkwg5h4Rc0FJQrMz SKgpyUZpbEbEOUB+v82lETlC09gb/Fsg4jWTRJ64vulEi6jKDVA/tdK1oNNm+jIP9Kjj 0gblBtMpM+2JIbOn30QkBilTVCA1J6iDD/oW3ApEcoA4wkQD6xZ7joRW0EZUrfDkUvJ4 CdXA== X-Gm-Message-State: AO0yUKVlDZ9810LeyJmcOXJp0Fq0IqLz9xUWLld5L39Es7qUm7chTzRC bBtLjNNGAlPV16R4921pNbqIe5wTUXHmww== X-Google-Smtp-Source: AK7set9T0oVZNw/aw058km8X+h4+Qyp0PmbafTTIYxl0Cn0gB213swg2Vxuw+E7tMAdkZswQV8KlbQ== X-Received: by 2002:a05:6512:374d:b0:4e8:410d:9aef with SMTP id a13-20020a056512374d00b004e8410d9aefmr6085006lfs.54.1679238676173; Sun, 19 Mar 2023 08:11:16 -0700 (PDT) Received: from surface-pro-6.. ([2a00:1370:818c:4a57:577a:76f4:df43:5e66]) by smtp.gmail.com with ESMTPSA id m19-20020ac24253000000b004e90dee5469sm1274089lfl.157.2023.03.19.08.11.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Mar 2023 08:11:15 -0700 (PDT) To: libc-alpha@sourceware.org, bug-hurd@gnu.org Cc: Samuel Thibault , Sergey Bugaev Subject: [RFC PATCH glibc 21/34] x86_64: Add rtld-stpncpy & rtld-strncpy Date: Sun, 19 Mar 2023 18:10:04 +0300 Message-Id: <20230319151017.531737-22-bugaevc@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230319151017.531737-1-bugaevc@gmail.com> References: <20230319151017.531737-1-bugaevc@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.4 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 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-Patchwork-Original-From: Sergey Bugaev via Libc-alpha From: Sergey Bugaev Reply-To: Sergey Bugaev Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" Just like the other existing rtld-str* files, this provides rtld with usable versions of stpncpy and strncpy. Signed-off-by: Sergey Bugaev --- sysdeps/x86_64/multiarch/rtld-stpncpy.S | 18 ++++++++++++++++++ sysdeps/x86_64/multiarch/rtld-strncpy.S | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 sysdeps/x86_64/multiarch/rtld-stpncpy.S create mode 100644 sysdeps/x86_64/multiarch/rtld-strncpy.S diff --git a/sysdeps/x86_64/multiarch/rtld-stpncpy.S b/sysdeps/x86_64/multiarch/rtld-stpncpy.S new file mode 100644 index 00000000..1c6780a1 --- /dev/null +++ b/sysdeps/x86_64/multiarch/rtld-stpncpy.S @@ -0,0 +1,18 @@ +/* Copyright (C) 2022-2023 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 "../stpncpy.S" diff --git a/sysdeps/x86_64/multiarch/rtld-strncpy.S b/sysdeps/x86_64/multiarch/rtld-strncpy.S new file mode 100644 index 00000000..500a1002 --- /dev/null +++ b/sysdeps/x86_64/multiarch/rtld-strncpy.S @@ -0,0 +1,18 @@ +/* Copyright (C) 2022-2023 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 "../strncpy.S"