yann@1625: ports/sysdeps/alpha/dl-machine.h | 12 ++++++ yann@1625: ports/sysdeps/alpha/dl-procinfo.c | 64 +++++++++++++++++++++++++++++++++++ yann@1625: ports/sysdeps/alpha/dl-procinfo.h | 68 ++++++++++++++++++++++++++++++++++++++ yann@1625: 3 files changed, 144 insertions(+) yann@1625: yann@1625: diff -durN glibc-2.10.1.orig/glibc-ports-2.10.1/sysdeps/alpha/dl-machine.h glibc-2.10.1/glibc-ports-2.10.1/sysdeps/alpha/dl-machine.h yann@1625: --- glibc-2.10.1.orig/glibc-ports-2.10.1/sysdeps/alpha/dl-machine.h 2009-05-16 10:36:20.000000000 +0200 yann@1625: +++ glibc-2.10.1/glibc-ports-2.10.1/sysdeps/alpha/dl-machine.h 2009-11-13 00:51:02.000000000 +0100 yann@1625: @@ -249,6 +249,18 @@ yann@1625: /* The alpha never uses Elf64_Rel relocations. */ yann@1625: #define ELF_MACHINE_NO_REL 1 yann@1625: yann@1625: +/* We define an initialization functions. This is called very early in yann@1625: + * _dl_sysdep_start. */ yann@1625: +#define DL_PLATFORM_INIT dl_platform_init () yann@1625: + yann@1625: +static inline void __attribute__ ((unused)) yann@1625: +dl_platform_init (void) yann@1625: +{ yann@1625: + if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0') yann@1625: + /* Avoid an empty string which would disturb us. */ yann@1625: + GLRO(dl_platform) = NULL; yann@1625: +} yann@1625: + yann@1625: /* Fix up the instructions of a PLT entry to invoke the function yann@1625: rather than the dynamic linker. */ yann@1625: static inline Elf64_Addr yann@1625: diff -durN glibc-2.10.1.orig/glibc-ports-2.10.1/sysdeps/alpha/dl-procinfo.c glibc-2.10.1/glibc-ports-2.10.1/sysdeps/alpha/dl-procinfo.c yann@1625: --- glibc-2.10.1.orig/glibc-ports-2.10.1/sysdeps/alpha/dl-procinfo.c 1970-01-01 01:00:00.000000000 +0100 yann@1625: +++ glibc-2.10.1/glibc-ports-2.10.1/sysdeps/alpha/dl-procinfo.c 2009-11-13 00:51:02.000000000 +0100 yann@1625: @@ -0,0 +1,64 @@ yann@1625: +/* Data for Alpha version of processor capability information. yann@1625: + Copyright (C) 2007 Free Software Foundation, Inc. yann@1625: + This file is part of the GNU C Library. yann@1625: + Contributed by Aurelien Jarno , 2007. yann@1625: + yann@1625: + The GNU C Library is free software; you can redistribute it and/or yann@1625: + modify it under the terms of the GNU Lesser General Public yann@1625: + License as published by the Free Software Foundation; either yann@1625: + version 2.1 of the License, or (at your option) any later version. yann@1625: + yann@1625: + The GNU C Library is distributed in the hope that it will be useful, yann@1625: + but WITHOUT ANY WARRANTY; without even the implied warranty of yann@1625: + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU yann@1625: + Lesser General Public License for more details. yann@1625: + yann@1625: + You should have received a copy of the GNU Lesser General Public yann@1625: + License along with the GNU C Library; if not, write to the Free yann@1625: + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA yann@1625: + 02111-1307 USA. */ yann@1625: + yann@1625: +/* This information must be kept in sync with the _DL_PLATFORM_COUNT yann@1625: + definitions in procinfo.h. yann@1625: + yann@1625: + If anything should be added here check whether the size of each string yann@1625: + is still ok with the given array size. yann@1625: + yann@1625: + All the #ifdefs in the definitions are quite irritating but yann@1625: + necessary if we want to avoid duplicating the information. There yann@1625: + are three different modes: yann@1625: + yann@1625: + - PROCINFO_DECL is defined. This means we are only interested in yann@1625: + declarations. yann@1625: + yann@1625: + - PROCINFO_DECL is not defined: yann@1625: + yann@1625: + + if SHARED is defined the file is included in an array yann@1625: + initializer. The .element = { ... } syntax is needed. yann@1625: + yann@1625: + + if SHARED is not defined a normal array initialization is yann@1625: + needed. yann@1625: + */ yann@1625: + yann@1625: +#ifndef PROCINFO_CLASS yann@1625: +#define PROCINFO_CLASS yann@1625: +#endif yann@1625: + yann@1625: +#if !defined PROCINFO_DECL && defined SHARED yann@1625: + ._dl_alpha_platforms yann@1625: +#else yann@1625: +PROCINFO_CLASS const char _dl_alpha_platforms[5][5] yann@1625: +#endif yann@1625: +#ifndef PROCINFO_DECL yann@1625: += { yann@1625: + "ev4", "ev5", "ev56", "ev6", "ev67" yann@1625: + } yann@1625: +#endif yann@1625: +#if !defined SHARED || defined PROCINFO_DECL yann@1625: +; yann@1625: +#else yann@1625: +, yann@1625: +#endif yann@1625: + yann@1625: +#undef PROCINFO_DECL yann@1625: +#undef PROCINFO_CLASS yann@1625: diff -durN glibc-2.10.1.orig/glibc-ports-2.10.1/sysdeps/alpha/dl-procinfo.h glibc-2.10.1/glibc-ports-2.10.1/sysdeps/alpha/dl-procinfo.h yann@1625: --- glibc-2.10.1.orig/glibc-ports-2.10.1/sysdeps/alpha/dl-procinfo.h 1970-01-01 01:00:00.000000000 +0100 yann@1625: +++ glibc-2.10.1/glibc-ports-2.10.1/sysdeps/alpha/dl-procinfo.h 2009-11-13 00:51:02.000000000 +0100 yann@1625: @@ -0,0 +1,68 @@ yann@1625: +/* Alpha version of processor capability information handling macros. yann@1625: + Copyright (C) 2007 Free Software Foundation, Inc. yann@1625: + This file is part of the GNU C Library. yann@1625: + Contributed by Aurelien Jarno , 2007. yann@1625: + yann@1625: + The GNU C Library is free software; you can redistribute it and/or yann@1625: + modify it under the terms of the GNU Lesser General Public yann@1625: + License as published by the Free Software Foundation; either yann@1625: + version 2.1 of the License, or (at your option) any later version. yann@1625: + yann@1625: + The GNU C Library is distributed in the hope that it will be useful, yann@1625: + but WITHOUT ANY WARRANTY; without even the implied warranty of yann@1625: + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU yann@1625: + Lesser General Public License for more details. yann@1625: + yann@1625: + You should have received a copy of the GNU Lesser General Public yann@1625: + License along with the GNU C Library; if not, write to the Free yann@1625: + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA yann@1625: + 02111-1307 USA. */ yann@1625: + yann@1625: +#ifndef _DL_PROCINFO_H yann@1625: +#define _DL_PROCINFO_H 1 yann@1625: + yann@1625: +#include yann@1625: + yann@1625: + yann@1625: +/* Mask to filter out platforms. */ yann@1625: +#define _DL_HWCAP_PLATFORM (-1ULL) yann@1625: + yann@1625: +#define _DL_PLATFORMS_COUNT 5 yann@1625: + yann@1625: +static inline const char * yann@1625: +__attribute__ ((unused)) yann@1625: +_dl_platform_string (int idx) yann@1625: +{ yann@1625: + return GLRO(dl_alpha_platforms)[idx]; yann@1625: +}; yann@1625: + yann@1625: +static inline int yann@1625: +__attribute__ ((unused, always_inline)) yann@1625: +_dl_string_platform (const char *str) yann@1625: +{ yann@1625: + int i; yann@1625: + yann@1625: + if (str != NULL) yann@1625: + for (i = 0; i < _DL_PLATFORMS_COUNT; ++i) yann@1625: + { yann@1625: + if (strcmp (str, _dl_platform_string (i)) == 0) yann@1625: + return i; yann@1625: + } yann@1625: + return -1; yann@1625: +}; yann@1625: + yann@1625: +/* We cannot provide a general printing function. */ yann@1625: +#define _dl_procinfo(word) -1 yann@1625: + yann@1625: +/* There are no hardware capabilities defined. */ yann@1625: +#define _dl_hwcap_string(idx) "" yann@1625: + yann@1625: +/* By default there is no important hardware capability. */ yann@1625: +#define HWCAP_IMPORTANT (0) yann@1625: + yann@1625: +/* We don't have any hardware capabilities. */ yann@1625: +#define _DL_HWCAP_COUNT 0 yann@1625: + yann@1625: +#define _dl_string_hwcap(str) (-1) yann@1625: + yann@1625: +#endif /* dl-procinfo.h */ yann@1625: diff -durN glibc-2.10.1.orig/ports/sysdeps/alpha/dl-machine.h glibc-2.10.1/ports/sysdeps/alpha/dl-machine.h yann@1625: diff -durN glibc-2.10.1.orig/ports/sysdeps/alpha/dl-procinfo.c glibc-2.10.1/ports/sysdeps/alpha/dl-procinfo.c yann@1625: diff -durN glibc-2.10.1.orig/ports/sysdeps/alpha/dl-procinfo.h glibc-2.10.1/ports/sysdeps/alpha/dl-procinfo.h