1 /* Operating system support for run-time dynamic linker. Linux/PPC version.
2 Copyright (C) 1997, 1998, 2001, 2003, 2006 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 #include <kernel-features.h>
24 extern int __cache_line_size
;
25 weak_extern (__cache_line_size
)
27 /* Scan the Aux Vector for the "Data Cache Block Size" entry. If found
28 verify that the static extern __cache_line_size is defined by checking
29 for not NULL. If it is defined then assign the cache block size
30 value to __cache_line_size. */
31 #define DL_PLATFORM_AUXV \
32 case AT_DCACHEBSIZE: \
34 int *cls = & __cache_line_size; \
36 *cls = av->a_un.a_val; \
40 #ifndef __ASSUME_STD_AUXV
42 /* The PowerPC's auxiliary argument block gets aligned to a 16-byte
43 boundary. This is history and impossible to change compatibly. */
45 #define DL_FIND_ARG_COMPONENTS(cookie, argc, argv, envp, auxp) \
49 (argc) = *(long int *) cookie; \
50 (argv) = (char **) cookie + 1; \
51 (envp) = (argv) + (argc) + 1; \
52 for (_tmp = (envp); *_tmp; ++_tmp) \
54 /* The following '++' is important! */ \
57 _test = (size_t)_tmp; \
58 _test = (_test + 0xf) & ~0xf; \
59 /* Under some circumstances, MkLinux (up to at least DR3a5) \
60 omits the padding. To work around this, we make a \
61 basic sanity check of the argument vector. Of \
62 course, this means that in future, the argument \
63 vector will have to be laid out to allow for this \
65 if (((ElfW(auxv_t) *)_test)->a_type <= 0x10) \
66 _tmp = (char **)_test; \
67 (auxp) = (ElfW(auxv_t) *) _tmp; \
71 #include <sysdeps/unix/sysv/linux/dl-sysdep.c>