Line
Link Here
|
|
-- |
|
|
1 |
ports/sysdeps/alpha/dl-machine.h | 12 ++++++ |
|
ports/sysdeps/alpha/dl-machine.h | 12 ++++++ |
2 |
ports/sysdeps/alpha/dl-procinfo.c | 64 +++++++++++++++++++++++++++++++++++ |
1 |
ports/sysdeps/alpha/dl-procinfo.c | 64 +++++++++++++++++++++++++++++++++++ |
3 |
ports/sysdeps/alpha/dl-procinfo.h | 68 ++++++++++++++++++++++++++++++++++++++ |
2 |
ports/sysdeps/alpha/dl-procinfo.h | 68 ++++++++++++++++++++++++++++++++++++++ |
4 |
3 files changed, 144 insertions(+) |
3 |
3 files changed, 144 insertions(+) |
5 |
-- /dev/null |
4 |
++ b/ports/sysdeps/alpha/dl-procinfo.h |
Line 0
Link Here
|
0 |
-- /dev/null |
1 |
/* Alpha version of processor capability information handling macros. |
|
|
2 |
Copyright (C) 2007 Free Software Foundation, Inc. |
3 |
This file is part of the GNU C Library. |
4 |
Contributed by Aurelien Jarno <aurelien@aurel32.net>, 2007. |
5 |
|
6 |
The GNU C Library is free software; you can redistribute it and/or |
7 |
modify it under the terms of the GNU Lesser General Public |
8 |
License as published by the Free Software Foundation; either |
9 |
version 2.1 of the License, or (at your option) any later version. |
10 |
|
11 |
The GNU C Library is distributed in the hope that it will be useful, |
12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 |
Lesser General Public License for more details. |
15 |
|
16 |
You should have received a copy of the GNU Lesser General Public |
17 |
License along with the GNU C Library; if not, write to the Free |
18 |
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
19 |
02111-1307 USA. */ |
20 |
|
21 |
#ifndef _DL_PROCINFO_H |
22 |
#define _DL_PROCINFO_H 1 |
23 |
|
24 |
#include <ldsodefs.h> |
25 |
|
26 |
|
27 |
/* Mask to filter out platforms. */ |
28 |
#define _DL_HWCAP_PLATFORM (-1ULL) |
29 |
|
30 |
#define _DL_PLATFORMS_COUNT 5 |
31 |
|
32 |
static inline const char * |
33 |
__attribute__ ((unused)) |
34 |
_dl_platform_string (int idx) |
35 |
{ |
36 |
return GLRO(dl_alpha_platforms)[idx]; |
37 |
}; |
38 |
|
39 |
static inline int |
40 |
__attribute__ ((unused, always_inline)) |
41 |
_dl_string_platform (const char *str) |
42 |
{ |
43 |
int i; |
44 |
|
45 |
if (str != NULL) |
46 |
for (i = 0; i < _DL_PLATFORMS_COUNT; ++i) |
47 |
{ |
48 |
if (strcmp (str, _dl_platform_string (i)) == 0) |
49 |
return i; |
50 |
} |
51 |
return -1; |
52 |
}; |
53 |
|
54 |
/* We cannot provide a general printing function. */ |
55 |
#define _dl_procinfo(word) -1 |
56 |
|
57 |
/* There are no hardware capabilities defined. */ |
58 |
#define _dl_hwcap_string(idx) "" |
59 |
|
60 |
/* By default there is no important hardware capability. */ |
61 |
#define HWCAP_IMPORTANT (0) |
62 |
|
63 |
/* We don't have any hardware capabilities. */ |
64 |
#define _DL_HWCAP_COUNT 0 |
65 |
|
66 |
#define _dl_string_hwcap(str) (-1) |
67 |
|
68 |
#endif /* dl-procinfo.h */ |
|
|
69 |
++ b/ports/sysdeps/alpha/dl-procinfo.c |
Line 0
Link Here
|
0 |
-- a/ports/sysdeps/alpha/dl-machine.h |
1 |
/* Data for Alpha version of processor capability information. |
|
|
2 |
Copyright (C) 2007 Free Software Foundation, Inc. |
3 |
This file is part of the GNU C Library. |
4 |
Contributed by Aurelien Jarno <aurelien@aurel32.net>, 2007. |
5 |
|
6 |
The GNU C Library is free software; you can redistribute it and/or |
7 |
modify it under the terms of the GNU Lesser General Public |
8 |
License as published by the Free Software Foundation; either |
9 |
version 2.1 of the License, or (at your option) any later version. |
10 |
|
11 |
The GNU C Library is distributed in the hope that it will be useful, |
12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 |
Lesser General Public License for more details. |
15 |
|
16 |
You should have received a copy of the GNU Lesser General Public |
17 |
License along with the GNU C Library; if not, write to the Free |
18 |
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
19 |
02111-1307 USA. */ |
20 |
|
21 |
/* This information must be kept in sync with the _DL_PLATFORM_COUNT |
22 |
definitions in procinfo.h. |
23 |
|
24 |
If anything should be added here check whether the size of each string |
25 |
is still ok with the given array size. |
26 |
|
27 |
All the #ifdefs in the definitions are quite irritating but |
28 |
necessary if we want to avoid duplicating the information. There |
29 |
are three different modes: |
30 |
|
31 |
- PROCINFO_DECL is defined. This means we are only interested in |
32 |
declarations. |
33 |
|
34 |
- PROCINFO_DECL is not defined: |
35 |
|
36 |
+ if SHARED is defined the file is included in an array |
37 |
initializer. The .element = { ... } syntax is needed. |
38 |
|
39 |
+ if SHARED is not defined a normal array initialization is |
40 |
needed. |
41 |
*/ |
42 |
|
43 |
#ifndef PROCINFO_CLASS |
44 |
#define PROCINFO_CLASS |
45 |
#endif |
46 |
|
47 |
#if !defined PROCINFO_DECL && defined SHARED |
48 |
._dl_alpha_platforms |
49 |
#else |
50 |
PROCINFO_CLASS const char _dl_alpha_platforms[5][5] |
51 |
#endif |
52 |
#ifndef PROCINFO_DECL |
53 |
= { |
54 |
"ev4", "ev5", "ev56", "ev6", "ev67" |
55 |
} |
56 |
#endif |
57 |
#if !defined SHARED || defined PROCINFO_DECL |
58 |
; |
59 |
#else |
60 |
, |
61 |
#endif |
62 |
|
63 |
#undef PROCINFO_DECL |
64 |
#undef PROCINFO_CLASS |
|
|
65 |
++ b/ports/sysdeps/alpha/dl-machine.h |
Lines 249-254
Link Here
|
249 |
/* The alpha never uses Elf64_Rel relocations. */ |
249 |
/* The alpha never uses Elf64_Rel relocations. */ |
250 |
#define ELF_MACHINE_NO_REL 1 |
250 |
#define ELF_MACHINE_NO_REL 1 |
251 |
|
251 |
|
|
|
252 |
/* We define an initialization functions. This is called very early in |
253 |
* _dl_sysdep_start. */ |
254 |
#define DL_PLATFORM_INIT dl_platform_init () |
255 |
|
256 |
static inline void __attribute__ ((unused)) |
257 |
dl_platform_init (void) |
258 |
{ |
259 |
if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0') |
260 |
/* Avoid an empty string which would disturb us. */ |
261 |
GLRO(dl_platform) = NULL; |
262 |
} |
263 |
|
252 |
/* Fix up the instructions of a PLT entry to invoke the function |
264 |
/* Fix up the instructions of a PLT entry to invoke the function |
253 |
rather than the dynamic linker. */ |
265 |
rather than the dynamic linker. */ |
254 |
static inline Elf64_Addr |
266 |
static inline Elf64_Addr |