diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-01-17 01:14:51 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-01-17 01:14:51 +0000 |
commit | 629cd0b8084ed8b7bf6ac9bea97be2363a064412 (patch) | |
tree | 435566bf1562772b907a5f0f9205f87d73556c1f /sysdeps/unix/sysv/linux | |
parent | eca90c85f5c58634c573a6c59b382173fb2424bd (diff) | |
download | glibc-629cd0b8084ed8b7bf6ac9bea97be2363a064412.tar.gz glibc-629cd0b8084ed8b7bf6ac9bea97be2363a064412.tar.xz glibc-629cd0b8084ed8b7bf6ac9bea97be2363a064412.zip |
Update.
* sysdeps/unix/sysv/linux/i386/dl-procinfo.h: Move x86_cap_flags and x86_platforms data into new file after prepending _dl_. Change users. * sysdeps/unix/sysv/linux/i386/dl-procinfo.c: New file. * sysdeps/unix/sysv/linux/i386/Dist: Add dl-procinfo.c. * sysdeps/unix/sysv/linux/i386/Makefile: Add rules to build dl-procinfo.c.
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/Dist | 1 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/Makefile | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/dl-procinfo.c | 38 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/dl-procinfo.h | 25 |
4 files changed, 53 insertions, 17 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/Dist b/sysdeps/unix/sysv/linux/i386/Dist index ade2ab62da..e08e6bec06 100644 --- a/sysdeps/unix/sysv/linux/i386/Dist +++ b/sysdeps/unix/sysv/linux/i386/Dist @@ -1,4 +1,5 @@ clone.S +dl-procinfo.c olddirent.h oldgetrlimit64.c setresuid.c diff --git a/sysdeps/unix/sysv/linux/i386/Makefile b/sysdeps/unix/sysv/linux/i386/Makefile index 06325ab752..9cd71064d3 100644 --- a/sysdeps/unix/sysv/linux/i386/Makefile +++ b/sysdeps/unix/sysv/linux/i386/Makefile @@ -6,6 +6,12 @@ endif ifeq ($(subdir),elf) sysdep-others += lddlibc4 install-bin += lddlibc4 + +# extra shared linker files to link into dl-allobjs.so and libc +sysdep-dl-routines += dl-procinfo +sysdep_routines += dl-procinfo +# extra shared linker files to link only into dl-allobjs.so +sysdep-rtld-routines += dl-procinfo endif ifeq ($(subdir),csu) diff --git a/sysdeps/unix/sysv/linux/i386/dl-procinfo.c b/sysdeps/unix/sysv/linux/i386/dl-procinfo.c new file mode 100644 index 0000000000..93933ad31d --- /dev/null +++ b/sysdeps/unix/sysv/linux/i386/dl-procinfo.c @@ -0,0 +1,38 @@ +/* Data for Linux/i386 version of processor capability information. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This information must be kept in sync with the _DL_HWCAP_COUNT and + _DL_PLATFORM_COUNT definitions in procinfo.h. */ + + +/* If anything should be added here check whether the size of each string + is still ok with the given array size. */ +const char _dl_x86_cap_flags[][7] = + { + "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", + "cx8", "apic", "10", "sep", "mtrr", "pge", "mca", "cmov", + "pat", "pse36", "psn", "19", "20", "21", "22", "mmx", + "osfxsr", "xmm", "26", "27", "28", "29", "30", "amd3d" + }; + +const char _dl_x86_platforms[][5] = + { + "i386", "i486", "i586", "i686" + }; diff --git a/sysdeps/unix/sysv/linux/i386/dl-procinfo.h b/sysdeps/unix/sysv/linux/i386/dl-procinfo.h index 55bd830011..e55959a3b9 100644 --- a/sysdeps/unix/sysv/linux/i386/dl-procinfo.h +++ b/sysdeps/unix/sysv/linux/i386/dl-procinfo.h @@ -1,5 +1,5 @@ /* Linux/i386 version of processor capability information handling macros. - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -23,19 +23,10 @@ /* If anything should be added here check whether the size of each string is still ok with the given array size. */ -static const char x86_cap_flags[][7] = - { - "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", - "cx8", "apic", "10", "sep", "mtrr", "pge", "mca", "cmov", - "pat", "pse36", "psn", "19", "20", "21", "22", "mmx", - "osfxsr", "xmm", "26", "27", "28", "29", "30", "amd3d" - }; +extern const char _dl_x86_cap_flags[][7]; #define _DL_HWCAP_COUNT 32 -static const char x86_platforms[][5] = - { - "i386", "i486", "i586", "i686" - }; +extern const char _dl_x86_platforms[][5]; #define _DL_PLATFORMS_COUNT 4 /* Start at 48 to reserve some space. */ @@ -56,7 +47,7 @@ _dl_procinfo (int word) for (i = 0; i < _DL_HWCAP_COUNT; ++i) if (word & (1 << i)) - _dl_sysdep_message (" ", x86_cap_flags[i], NULL); + _dl_sysdep_message (" ", _dl_x86_cap_flags[i], NULL); _dl_sysdep_message ("\n", NULL); @@ -67,14 +58,14 @@ static inline const char * __attribute__ ((unused)) _dl_hwcap_string (int idx) { - return x86_cap_flags[idx]; + return _dl_x86_cap_flags[idx]; }; static inline const char * __attribute__ ((unused)) _dl_platform_string (int idx) { - return x86_platforms [idx - _DL_FIRST_PLATFORM]; + return _dl_x86_platforms [idx - _DL_FIRST_PLATFORM]; }; enum @@ -112,7 +103,7 @@ _dl_string_hwcap (const char *str) for (i = 0; i < _DL_HWCAP_COUNT; i++) { - if (strcmp (str, x86_cap_flags[i]) == 0) + if (strcmp (str, _dl_x86_cap_flags[i]) == 0) return i; } return -1; @@ -128,7 +119,7 @@ _dl_string_platform (const char *str) if (str != NULL) for (i = 0; i < _DL_PLATFORMS_COUNT; ++i) { - if (strcmp (str, x86_platforms[i]) == 0) + if (strcmp (str, _dl_x86_platforms[i]) == 0) return _DL_FIRST_PLATFORM + i; } return -1; |