diff options
author | Ryan S. Arnold <rsa@linux.vnet.ibm.com> | 2013-06-28 16:50:48 -0500 |
---|---|---|
committer | Ryan S. Arnold <rsa@linux.vnet.ibm.com> | 2013-06-28 16:50:48 -0500 |
commit | 1ae8bfe07c1ab2444cc1d186321ff1431a1b9f96 (patch) | |
tree | f7a784d6c5727eb0b1c0209a77db2ad99a36d92d /sysdeps | |
parent | 8fbec010989a242f6eb17be837255502c459977d (diff) | |
download | glibc-1ae8bfe07c1ab2444cc1d186321ff1431a1b9f96.zip glibc-1ae8bfe07c1ab2444cc1d186321ff1431a1b9f96.tar.gz glibc-1ae8bfe07c1ab2444cc1d186321ff1431a1b9f96.tar.bz2 |
Add GLRO(dl_hwcap2) for new AT_HWCAP2 auxv_t a_type.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/dl-procinfo.h | 2 | ||||
-rw-r--r-- | sysdeps/generic/ldsodefs.h | 4 | ||||
-rw-r--r-- | sysdeps/i386/dl-procinfo.h | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/dl-procinfo.h | 6 | ||||
-rw-r--r-- | sysdeps/s390/dl-procinfo.h | 2 | ||||
-rw-r--r-- | sysdeps/sparc/dl-procinfo.h | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/dl-procinfo.h | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/dl-procinfo.h | 6 |
8 files changed, 27 insertions, 7 deletions
diff --git a/sysdeps/generic/dl-procinfo.h b/sysdeps/generic/dl-procinfo.h index 90c87d9..a184a59 100644 --- a/sysdeps/generic/dl-procinfo.h +++ b/sysdeps/generic/dl-procinfo.h @@ -21,7 +21,7 @@ #define _DL_PROCINFO_H 1 /* We cannot provide a general printing function. */ -#define _dl_procinfo(word) -1 +#define _dl_procinfo(type, word) -1 /* There are no hardware capabilities defined. */ #define _dl_hwcap_string(idx) "" diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index cb17204..e7b0516 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -554,6 +554,10 @@ struct rtld_global_ro EXTERN struct link_map *_dl_sysinfo_map; #endif + /* Mask for more hardware capabilities that are available on some + platforms. */ + EXTERN uint64_t _dl_hwcap2; + #ifdef SHARED /* We add a function table to _rtld_global which is then used to call the function instead of going through the PLT. The result diff --git a/sysdeps/i386/dl-procinfo.h b/sysdeps/i386/dl-procinfo.h index 883fa7f..233a325 100644 --- a/sysdeps/i386/dl-procinfo.h +++ b/sysdeps/i386/dl-procinfo.h @@ -61,7 +61,7 @@ enum }; /* We cannot provide a general printing function. */ -#define _dl_procinfo(word) -1 +#define _dl_procinfo(type, word) -1 static inline const char * __attribute__ ((unused)) diff --git a/sysdeps/powerpc/dl-procinfo.h b/sysdeps/powerpc/dl-procinfo.h index 1c978ba..9531a2a 100644 --- a/sysdeps/powerpc/dl-procinfo.h +++ b/sysdeps/powerpc/dl-procinfo.h @@ -159,8 +159,12 @@ _dl_string_platform (const char *str) #ifdef IS_IN_rtld static inline int __attribute__ ((unused)) -_dl_procinfo (int word) +_dl_procinfo (unsigned int type, unsigned long int word) { + /* Fallback to unknown output mechanism. */ + if (type == AT_HWCAP2) + return -1; + _dl_printf ("AT_HWCAP: "); for (int i = _DL_HWCAP_FIRST; i < _DL_HWCAP_COUNT; ++i) diff --git a/sysdeps/s390/dl-procinfo.h b/sysdeps/s390/dl-procinfo.h index 717f6f9..45e27f1 100644 --- a/sysdeps/s390/dl-procinfo.h +++ b/sysdeps/s390/dl-procinfo.h @@ -56,7 +56,7 @@ enum | HWCAP_S390_EIMM | HWCAP_S390_DFP) /* We cannot provide a general printing function. */ -#define _dl_procinfo(word) -1 +#define _dl_procinfo(type, word) -1 static inline const char * __attribute__ ((unused)) diff --git a/sysdeps/sparc/dl-procinfo.h b/sysdeps/sparc/dl-procinfo.h index a18b099..71b279a 100644 --- a/sysdeps/sparc/dl-procinfo.h +++ b/sysdeps/sparc/dl-procinfo.h @@ -27,10 +27,14 @@ static inline int __attribute__ ((unused)) -_dl_procinfo (int word) +_dl_procinfo (unsigned int type, unsigned long int word) { int i; + /* Fallback to unknown output mechanism. */ + if (type == AT_HWCAP2) + return -1; + _dl_printf ("AT_HWCAP: "); for (i = 0; i < _DL_HWCAP_COUNT; ++i) diff --git a/sysdeps/unix/sysv/linux/i386/dl-procinfo.h b/sysdeps/unix/sysv/linux/i386/dl-procinfo.h index a82f8f5..10f1c00 100644 --- a/sysdeps/unix/sysv/linux/i386/dl-procinfo.h +++ b/sysdeps/unix/sysv/linux/i386/dl-procinfo.h @@ -24,12 +24,16 @@ #undef _dl_procinfo static inline int __attribute__ ((unused)) -_dl_procinfo (int word) +_dl_procinfo (unsigned int type, unsigned long int word) { /* This table should match the information from arch/i386/kernel/setup.c in the kernel sources. */ int i; + /* Fallback to unknown output mechanism. */ + if (type == AT_HWCAP2) + return -1; + _dl_printf ("AT_HWCAP: "); for (i = 0; i < _DL_HWCAP_COUNT; ++i) diff --git a/sysdeps/unix/sysv/linux/s390/dl-procinfo.h b/sysdeps/unix/sysv/linux/s390/dl-procinfo.h index 5ca4b76..3312304 100644 --- a/sysdeps/unix/sysv/linux/s390/dl-procinfo.h +++ b/sysdeps/unix/sysv/linux/s390/dl-procinfo.h @@ -24,12 +24,16 @@ #undef _dl_procinfo static inline int __attribute__ ((unused)) -_dl_procinfo (int word) +_dl_procinfo (unsigned int type, unsigned long int word) { /* This table should match the information from arch/s390/kernel/setup.c in the kernel sources. */ int i; + /* Fallback to unknown output mechanism. */ + if (type == AT_HWCAP2) + return -1; + _dl_printf ("AT_HWCAP: "); for (i = 0; i < _DL_HWCAP_COUNT; ++i) |