From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7473 invoked by alias); 11 Dec 2017 13:19:58 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 6708 invoked by uid 89); 11 Dec 2017 13:19:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HX-HELO:sk:mail-oi X-HELO: mail-oi0-f65.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=XblgjXklDs/BhGv+xjXW1g8K7TLH7JsTnFhlmLvo8Ok=; b=j1/HreCe9iHocILYfk0l1xYyANCQXdkoutBb58RJ8IgQab5J7umGLfdl8ufOVxQW/a PaT5Z6JxSaSEr7hE0PY3bC+iDpwUXc73UPXvxEXutG/KFAAEleWF/KVn7qS2uUikqbko 9qJSjOM0jj/x6/MDRNwXy3AyZ2tVr6cDdgWVeYwwZcz2ccMpDuf5Ox3xJMULC7sTgOPC at2PkiztC3AE2k/QcDu7JIA01dAbYqhp9YCW8L/9rUfAQTnW4MGdJjD4RWIVgLcQin9o 5iJ04QInezAQliSwCPqHHuTnJa3gGB9xzPZwrwCvS58R1OcqRJNNG8Xk1IuqVTYaOp1o AQ7Q== X-Gm-Message-State: AKGB3mKtUTGJAfcapv3LEBjDFGe067TzP7dXiGBM922caNUyJIsDH/3/ AibVz3GdaQf1KroWMr88+u96ccYNNABgp1e9VuM= X-Google-Smtp-Source: ACJfBovTW+7LjJhDTP58zQT0Ya3JvNFwZ8e8QHAh+J6NZVXavPyifTHrnIdp0SvSeCjOCeF0QlxnuxE57TY4omWjgS0= X-Received: by 10.202.236.3 with SMTP id k3mr276261oih.330.1512998394321; Mon, 11 Dec 2017 05:19:54 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <20171125001327.GA17465@gmail.com> From: "H.J. Lu" Date: Mon, 11 Dec 2017 13:19:00 -0000 Message-ID: Subject: Re: [PATCH] Add wcharP.h to hide internal wchar functions [BZ #18822] To: GNU C Library Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2017-12/txt/msg00303.txt.bz2 On Mon, Dec 4, 2017 at 5:07 AM, H.J. Lu wrote: > On Fri, Nov 24, 2017 at 4:13 PM, H.J. Lu wrote: >> For some targets, like i386 and s390, internal IFUNC functions must be >> called via PLT with a special register. Add to allow targets, >> which don't need a special register to call internal IFUNC functions via >> PLT or have internal non-IFUNC wchar functions, to allow direct access to >> internal wchar functions within libc.so and libc.a without using GOT nor >> PLT. >> >> Tested on i686 and x86-64. It removed 11 PLT relocations on i686 and >> 29 PLT relocations on x86-64. >> >> Any comments? > > Any objections? I am checking it in today. >> H.J. >> --- >> [BZ #18822] >> * include/wchar.h: Include . >> * sysdeps/generic/wcharP.h: New file. >> * sysdeps/i386/wcharP.h: Likewise. >> * sysdeps/x86_64/wcharP.h: Likewise. >> --- >> include/wchar.h | 1 + >> sysdeps/generic/wcharP.h | 18 ++++++++++++++++++ >> sysdeps/i386/wcharP.h | 24 ++++++++++++++++++++++++ >> sysdeps/x86_64/wcharP.h | 25 +++++++++++++++++++++++++ >> 4 files changed, 68 insertions(+) >> create mode 100644 sysdeps/generic/wcharP.h >> create mode 100644 sysdeps/i386/wcharP.h >> create mode 100644 sysdeps/x86_64/wcharP.h >> >> diff --git a/include/wchar.h b/include/wchar.h >> index 1db0ac8278..4160322234 100644 >> --- a/include/wchar.h >> +++ b/include/wchar.h >> @@ -2,6 +2,7 @@ >> # include >> # ifndef _ISOMAC >> >> +#include >> #include >> >> extern __typeof (wcscasecmp_l) __wcscasecmp_l; >> diff --git a/sysdeps/generic/wcharP.h b/sysdeps/generic/wcharP.h >> new file mode 100644 >> index 0000000000..1a37283bf1 >> --- /dev/null >> +++ b/sysdeps/generic/wcharP.h >> @@ -0,0 +1,18 @@ >> +/* Internal prototrypes for multibyte and wide character functions. >> + Generic version. >> + Copyright (C) 2017 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 >> + . */ >> diff --git a/sysdeps/i386/wcharP.h b/sysdeps/i386/wcharP.h >> new file mode 100644 >> index 0000000000..deac12e352 >> --- /dev/null >> +++ b/sysdeps/i386/wcharP.h >> @@ -0,0 +1,24 @@ >> +/* Internal prototrypes for multibyte and wide character functions. >> + i386 version. >> + Copyright (C) 2017 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 >> + . */ >> + >> +extern __typeof (wcpncpy) __wcpncpy attribute_hidden; >> +extern __typeof (wcscat) __wcscat attribute_hidden __attribute_pure__; >> +extern __typeof (wcschrnul) __wcschrnul attribute_hidden __attribute_pure__; >> +extern __typeof (wcsncpy) __wcsncpy attribute_hidden; >> +extern __typeof (wcsnlen) __wcsnlen attribute_hidden __attribute_pure__; >> diff --git a/sysdeps/x86_64/wcharP.h b/sysdeps/x86_64/wcharP.h >> new file mode 100644 >> index 0000000000..bd6272db9d >> --- /dev/null >> +++ b/sysdeps/x86_64/wcharP.h >> @@ -0,0 +1,25 @@ >> +/* Internal prototrypes for multibyte and wide character functions. >> + x86-64 version. >> + Copyright (C) 2017 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 >> + . */ >> + >> +extern __typeof (wcpncpy) __wcpncpy attribute_hidden; >> +extern __typeof (wcscat) __wcscat attribute_hidden __attribute_pure__; >> +extern __typeof (wcschrnul) __wcschrnul attribute_hidden __attribute_pure__; >> +extern __typeof (wcsncpy) __wcsncpy attribute_hidden; >> +extern __typeof (wcslen) __wcslen attribute_hidden __attribute_pure__; >> +extern __typeof (wcsnlen) __wcsnlen attribute_hidden __attribute_pure__; >> -- >> 2.14.3 >> > > > > -- > H.J. -- H.J.