]> sourceware.org Git - glibc.git/blob - sysdeps/unix/sysv/linux/powerpc/init-first.c
elf: Enable relro for static build
[glibc.git] / sysdeps / unix / sysv / linux / powerpc / init-first.c
1 /* Initialization code run first thing by the ELF startup code. Linux/PowerPC.
2 Copyright (C) 2007-2020 Free Software Foundation, Inc.
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
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19 #include <dl-vdso.h>
20 #include <libc-vdso.h>
21
22 unsigned long long (*VDSO_SYMBOL(get_tbfreq)) (void) attribute_hidden;
23 #if defined(__PPC64__) || defined(__powerpc64__)
24 void *VDSO_SYMBOL(sigtramp_rt64) attribute_hidden;
25 #else
26 void *VDSO_SYMBOL(sigtramp32) attribute_hidden;
27 void *VDSO_SYMBOL(sigtramp_rt32) attribute_hidden;
28 #endif
29
30 static inline void
31 __libc_vdso_platform_setup_arch (void)
32 {
33 VDSO_SYMBOL (get_tbfreq) = get_vdso_mangle_symbol (HAVE_GET_TBFREQ);
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
37 (__kernel_sigtramp32).
38 There is no need to pointer mangle these symbol because they will
39 used only for pointer comparison. */
40 #if defined(__PPC64__) || defined(__powerpc64__)
41 VDSO_SYMBOL(sigtramp_rt64) = get_vdso_symbol (HAVE_SIGTRAMP_RT64);
42 #else
43 VDSO_SYMBOL(sigtramp32) = get_vdso_symbol (HAVE_SIGTRAMP_32);
44 VDSO_SYMBOL(sigtramp_rt32) = get_vdso_symbol (HAVE_SIGTRAMP_RT32);
45 #endif
46 }
47
48 #define VDSO_SETUP_ARCH __libc_vdso_platform_setup_arch
49
50 #include <sysdeps/unix/sysv/linux/init-first.c>
This page took 0.037088 seconds and 5 git commands to generate.