]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/unix/sysv/linux/powerpc/init-first.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / powerpc / init-first.c
CommitLineData
93c65d43 1/* Initialization code run first thing by the ELF startup code. Linux/PowerPC.
d614a753 2 Copyright (C) 2007-2020 Free Software Foundation, Inc.
8c2e201b
UD
3 This file is part of the GNU C Library.
4
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.
9
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.
14
15 You should have received a copy of the GNU Lesser General Public
59ba27a6 16 License along with the GNU C Library; if not, see
5a82c748 17 <https://www.gnu.org/licenses/>. */
8c2e201b 18
8ae74ead
RÁE
19#include <dl-vdso.h>
20#include <libc-vdso.h>
8c2e201b 21
b8a7c7da 22unsigned long long (*VDSO_SYMBOL(get_tbfreq)) (void) attribute_hidden;
d400dcac 23#if defined(__PPC64__) || defined(__powerpc64__)
b8a7c7da 24void *VDSO_SYMBOL(sigtramp_rt64) attribute_hidden;
d400dcac 25#else
b8a7c7da
AZ
26void *VDSO_SYMBOL(sigtramp32) attribute_hidden;
27void *VDSO_SYMBOL(sigtramp_rt32) attribute_hidden;
d400dcac 28#endif
75fb247e
UD
29
30static inline void
b8a7c7da 31__libc_vdso_platform_setup_arch (void)
75fb247e 32{
b8a7c7da 33 VDSO_SYMBOL (get_tbfreq) = get_vdso_mangle_symbol (HAVE_GET_TBFREQ);
d400dcac
AZ
34
35 /* PPC64 uses only one signal trampoline symbol, while PPC32 will use
36 two depending if SA_SIGINFO is used (__kernel_sigtramp_rt32) or not
f534255e
AZ
37 (__kernel_sigtramp32).
38 There is no need to pointer mangle these symbol because they will
39 used only for pointer comparison. */
d400dcac 40#if defined(__PPC64__) || defined(__powerpc64__)
b8a7c7da 41 VDSO_SYMBOL(sigtramp_rt64) = get_vdso_symbol (HAVE_SIGTRAMP_RT64);
d400dcac 42#else
b8a7c7da
AZ
43 VDSO_SYMBOL(sigtramp32) = get_vdso_symbol (HAVE_SIGTRAMP_32);
44 VDSO_SYMBOL(sigtramp_rt32) = get_vdso_symbol (HAVE_SIGTRAMP_RT32);
d400dcac 45#endif
75fb247e
UD
46}
47
b8a7c7da 48#define VDSO_SETUP_ARCH __libc_vdso_platform_setup_arch
75fb247e 49
b8a7c7da 50#include <sysdeps/unix/sysv/linux/init-first.c>