Fix pread consolidation on ports that require argument alignment
[glibc.git] / sysdeps / s390 / sotruss-lib.c
blob8c53bc5b79adfe1ddfe62363fde9ee421f05f92c
1 /* Override generic sotruss-lib.c to define actual functions for s390.
2 Copyright (C) 2012-2016 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
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.
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.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library. If not, see
18 <http://www.gnu.org/licenses/>. */
20 #define HAVE_ARCH_PLTENTER
21 #define HAVE_ARCH_PLTEXIT
23 #include <elf/sotruss-lib.c>
25 #if __ELF_NATIVE_CLASS == 32
26 # define la_s390_gnu_pltenter la_s390_32_gnu_pltenter
27 # define la_s390_gnu_pltexit la_s390_32_gnu_pltexit
28 # define La_s390_regs La_s390_32_regs
29 # define La_s390_retval La_s390_32_retval
30 #else
31 # define la_s390_gnu_pltenter la_s390_64_gnu_pltenter
32 # define la_s390_gnu_pltexit la_s390_64_gnu_pltexit
33 # define La_s390_regs La_s390_64_regs
34 # define La_s390_retval La_s390_64_retval
35 #endif
37 ElfW(Addr)
38 la_s390_gnu_pltenter (ElfW(Sym) *sym,
39 unsigned int ndx __attribute__ ((unused)),
40 uintptr_t *refcook, uintptr_t *defcook,
41 La_s390_regs *regs, unsigned int *flags,
42 const char *symname, long int *framesizep)
44 print_enter (refcook, defcook, symname,
45 regs->lr_r2, regs->lr_r3, regs->lr_r4, *flags);
47 /* No need to copy anything, we will not need the parameters in any case. */
48 *framesizep = 0;
50 return sym->st_value;
53 unsigned int
54 la_s390_gnu_pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
55 uintptr_t *defcook,
56 const struct La_s390_regs *inregs,
57 struct La_s390_retval *outregs, const char *symname)
59 print_exit (refcook, defcook, symname, outregs->lrv_r2);
61 return 0;