lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | /* Override generic sotruss-lib.c to define actual functions for ia64. |
| 2 | Copyright (C) 2012-2015 Free Software Foundation, Inc. |
| 3 | |
| 4 | This file is part of the GNU C Library. |
| 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, see |
| 18 | <http://www.gnu.org/licenses/>. */ |
| 19 | |
| 20 | #define HAVE_ARCH_PLTENTER |
| 21 | #define HAVE_ARCH_PLTEXIT |
| 22 | |
| 23 | #include <elf/sotruss-lib.c> |
| 24 | |
| 25 | ElfW(Addr) |
| 26 | la_ia64_gnu_pltenter (ElfW(Sym) *sym __attribute__ ((unused)), |
| 27 | unsigned int ndx __attribute__ ((unused)), |
| 28 | uintptr_t *refcook, uintptr_t *defcook, |
| 29 | La_ia64_regs *regs, unsigned int *flags, |
| 30 | const char *symname, long int *framesizep) |
| 31 | { |
| 32 | print_enter (refcook, defcook, symname, |
| 33 | regs->lr_gr[0], regs->lr_gr[1], regs->lr_gr[2], *flags); |
| 34 | |
| 35 | /* No need to copy anything, we will not need the parameters in any case. */ |
| 36 | *framesizep = 0; |
| 37 | |
| 38 | return sym->st_value; |
| 39 | } |
| 40 | |
| 41 | unsigned int |
| 42 | la_ia64_gnu_pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook, |
| 43 | uintptr_t *defcook, |
| 44 | const struct La_ia64_regs *inregs, |
| 45 | struct La_ia64_retval *outregs, const char *symname) |
| 46 | { |
| 47 | print_exit (refcook, defcook, symname, outregs->lrv_r8); |
| 48 | |
| 49 | return 0; |
| 50 | } |