1 /* Xtensa dynamic resolver.
2 Parts copied from glibc/sysdeps/xtensa/dl-trampoline.S
3 Copyright (C) 2007 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 MIN_FRAME_SIZE 32
23 #define XTENSA_IMM12_FLD_OFFSET 8
24 #else /* __XTENSA_EL__ */
25 #define XTENSA_IMM12_FLD_OFFSET 12
26 #endif /* __XTENSA_EL__ */
31 .global _dl_linux_resolve
32 .type _dl_linux_resolve, @function
34 /* Fix up the high 2 bits of the return address. */
37 0: extui a13, a13, 30, 2
41 /* Call the fixup function. */
42 movi a8, _dl_linux_resolver
45 /* Extract the target's frame size from the ENTRY instruction. */
47 extui a11, a11, XTENSA_IMM12_FLD_OFFSET, 12
50 addi a11, a11, -MIN_FRAME_SIZE
54 /* Jump to the next instruction past the ENTRY. */
57 .size _dl_linux_resolve, . - _dl_linux_resolve