This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [Committed] S/390: Make IFUNC optimized mem* functions hidden
- From: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 5 Mar 2013 13:21:31 +0100
- Subject: Re: [Committed] S/390: Make IFUNC optimized mem* functions hidden
- References: <20120903121454.GA11550@bart><20120906194524.C59A82C0BF@topped-with-meat.com>
On Thu, Sep 06, 2012 at 12:45:24PM -0700, Roland McGrath wrote:
> > + /* Make the declarations of the optimized functions hidden in order
> > + to prevent GOT slots being generated for them. */ \
> > + extern __attribute__((visibility("hidden"))) void *FUNC##_z196; \
> > + extern __attribute__((visibility("hidden"))) void *FUNC##_z10; \
> > + extern __attribute__((visibility("hidden"))) void *FUNC##_z900; \
>
> This attribute syntax has wrong whitespace.
> But you should just use the attribute_hidden macro anyway, it's shorter.
> Also, it's our convention for declarations to put attributes at the end,
> not before the type (before the type is the convention for definitions).
Ok. Fixed with the attached patch.
Bye,
-Andreas-
2013-03-05 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* sysdeps/s390/s390-32/multiarch/ifunc-resolve.c: Use
attribute_hidden.
* sysdeps/s390/s390-64/multiarch/ifunc-resolve.c: Likewise.
---
sysdeps/s390/s390-32/multiarch/ifunc-resolve.c | 6 +++---
sysdeps/s390/s390-64/multiarch/ifunc-resolve.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
Index: glibc/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c
===================================================================
--- glibc.orig/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c
+++ glibc/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c
@@ -34,9 +34,9 @@
\
/* Make the declarations of the optimized functions hidden in order
to prevent GOT slots being generated for them. */ \
- extern __attribute__((visibility("hidden"))) void *FUNC##_z196; \
- extern __attribute__((visibility("hidden"))) void *FUNC##_z10; \
- extern __attribute__((visibility("hidden"))) void *FUNC##_g5; \
+ extern void *FUNC##_z196 attribute_hidden; \
+ extern void *FUNC##_z10 attribute_hidden; \
+ extern void *FUNC##_g5 attribute_hidden; \
\
void *resolve_##FUNC (unsigned long int dl_hwcap) \
{ \
Index: glibc/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c
===================================================================
--- glibc.orig/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c
+++ glibc/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c
@@ -34,9 +34,9 @@
\
/* Make the declarations of the optimized functions hidden in order
to prevent GOT slots being generated for them. */ \
- extern __attribute__((visibility("hidden"))) void *FUNC##_z196; \
- extern __attribute__((visibility("hidden"))) void *FUNC##_z10; \
- extern __attribute__((visibility("hidden"))) void *FUNC##_z900; \
+ extern void *FUNC##_z196 attribute_hidden; \
+ extern void *FUNC##_z10 attribute_hidden; \
+ extern void *FUNC##_z900 attribute_hidden; \
\
void *resolve_##FUNC (unsigned long int dl_hwcap) \
{ \