From patchwork Mon Aug 21 12:57:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 22260 Received: (qmail 115182 invoked by alias); 21 Aug 2017 12:57:44 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 114912 invoked by uid 89); 21 Aug 2017 12:57:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-oi0-f68.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:cc; bh=VLojd2Ptm9K8UuuLDyik8VbX8yNC3BbKcLlSAuoEkkw=; b=XGcnLUWmCbCDrZJ6Oi/WmZjTL5t1lo8kTQkaXS8XMY9Axqp+I44KmqVeD0879HeXyW Om7Hs8bwigvE6yXKT+aTFV4Enu6pLg/MW1LIxgaN30rChVbTPeikkUU1VtnzEExYNt/H WBLrxxwIgmCGmMaUnS71FMJoqchctg8ErLj/HyW68rtf5w7ZuQqZa/F1YnZ7ZJkQdH12 qbTFzv1//JgZUALky5HwpGyJHwxd4qKe8DxE0qBptC9kXLhF3CEaVY7BZNo2NeH+Vsd3 3UxVfjRuhcysEzLVTo0c14HwtV0MdHN+zC8U3RCW/q24KOU2TsL3iRydK05fC6Ixo8py RVeA== X-Gm-Message-State: AHYfb5iKxShH7XkP7460DhbTZ4qfZ71tGeC3nNDliIF7SbV4CnqEH+rY HoCiCjliZktS61MhpesxRGRKt0DJYw== X-Received: by 10.202.179.85 with SMTP id c82mr21080871oif.5.1503320257965; Mon, 21 Aug 2017 05:57:37 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <0669c45a-1145-8f56-3135-1d757146024d@redhat.com> References: <20170818162849.GC21741@gmail.com> <0669c45a-1145-8f56-3135-1d757146024d@redhat.com> From: "H.J. Lu" Date: Mon, 21 Aug 2017 05:57:37 -0700 Message-ID: Subject: Re: [PATCH 3/3] x86-64: Mark internal symbols with attribute_hidden [BZ #18822] To: Florian Weimer Cc: GNU C Library On Mon, Aug 21, 2017 at 5:38 AM, Florian Weimer wrote: > On 08/18/2017 06:28 PM, H.J. Lu wrote: > >> -extern long int __syscall_clock_gettime (clockid_t, struct timespec *); >> +extern long int __syscall_clock_gettime (clockid_t, struct timespec *) >> + attribute_hidden; > > Should this be > > __typeof__ (clock_gettime) __syscall_clock_gettime attribute_hidden; > > for added type safety? > >> static inline void >> diff --git a/sysdeps/unix/sysv/linux/x86_64/makecontext.c b/sysdeps/unix/sysv/linux/x86_64/makecontext.c >> index 59fb77a8c1..e198a2215a 100644 >> --- a/sysdeps/unix/sysv/linux/x86_64/makecontext.c >> +++ b/sysdeps/unix/sysv/linux/x86_64/makecontext.c >> @@ -51,7 +51,7 @@ >> void >> __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) >> { >> - extern void __start_context (void); >> + extern void __start_context (void) attribute_hidden; > > This is okay. The definition is in assembler code, so a separate header > would not add type safety. > This is what I am checking in. Thanks. From 1653eb9bb7687a1930920902ea07bf4608770dbc Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 18 Aug 2017 09:23:31 -0700 Subject: [PATCH] x86-64: Mark internal symbols with attribute_hidden [BZ #18822] Since __syscall_clock_gettime and __start_context are internal symbols for Linux/x86-64, mark them with attribute_hidden. [BZ #18822] * sysdeps/unix/sysv/linux/x86_64/init-first.c (__syscall_clock_gettime): Add attribute_hidden. * sysdeps/unix/sysv/linux/x86_64/makecontext.c (__start_context): Likewise. --- sysdeps/unix/sysv/linux/x86_64/init-first.c | 2 +- sysdeps/unix/sysv/linux/x86_64/makecontext.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/x86_64/init-first.c b/sysdeps/unix/sysv/linux/x86_64/init-first.c index f1c46cb5bc..b187239ba0 100644 --- a/sysdeps/unix/sysv/linux/x86_64/init-first.c +++ b/sysdeps/unix/sysv/linux/x86_64/init-first.c @@ -27,7 +27,7 @@ long int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *) long int (*VDSO_SYMBOL(getcpu)) (unsigned *, unsigned *, void *) attribute_hidden; -extern long int __syscall_clock_gettime (clockid_t, struct timespec *); +extern __typeof (clock_gettime) __syscall_clock_gettime attribute_hidden; static inline void diff --git a/sysdeps/unix/sysv/linux/x86_64/makecontext.c b/sysdeps/unix/sysv/linux/x86_64/makecontext.c index 59fb77a8c1..e198a2215a 100644 --- a/sysdeps/unix/sysv/linux/x86_64/makecontext.c +++ b/sysdeps/unix/sysv/linux/x86_64/makecontext.c @@ -51,7 +51,7 @@ void __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) { - extern void __start_context (void); + extern void __start_context (void) attribute_hidden; greg_t *sp; unsigned int idx_uc_link; va_list ap; -- 2.13.5