|
Packit |
6c4009 |
/* Copyright (C) 2010-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
This file is part of the GNU C Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit |
6c4009 |
modify it under the terms of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License as published by the Free Software Foundation; either
|
|
Packit |
6c4009 |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit |
6c4009 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6c4009 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
6c4009 |
Lesser General Public License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
You should have received a copy of the GNU Lesser General Public
|
|
Packit |
6c4009 |
License along with the GNU C Library. If not, see
|
|
Packit |
6c4009 |
<http://www.gnu.org/licenses/>. */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* When this file is built for inclusion in nscd, _FORTIFY_SOURCE is
|
|
Packit |
6c4009 |
defined but -O is not used, resulting in a warning from features.h. */
|
|
Packit |
6c4009 |
#undef _FORTIFY_SOURCE
|
|
Packit |
6c4009 |
#include <sysdep.h>
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* Out-of-line syscall stub. We expect the system call number in ip
|
|
Packit |
6c4009 |
and return the raw result in r0. No registers are clobbered.
|
|
Packit |
6c4009 |
We could avoid using the stack for this, but the goal is accurate
|
|
Packit |
6c4009 |
unwind information - and while there is a reserved prefix in the
|
|
Packit |
6c4009 |
ARM unwind tables for register to register moves, the actual opcodes
|
|
Packit |
6c4009 |
are not defined. */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#if defined(__thumb__)
|
|
Packit |
6c4009 |
.thumb
|
|
Packit |
6c4009 |
.syntax unified
|
|
Packit |
6c4009 |
.hidden __libc_do_syscall
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#undef CALL_MCOUNT
|
|
Packit |
6c4009 |
#define CALL_MCOUNT
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ENTRY (__libc_do_syscall)
|
|
Packit |
6c4009 |
.fnstart
|
|
Packit |
6c4009 |
push {r7, lr}
|
|
Packit |
6c4009 |
.save {r7, lr}
|
|
Packit |
6c4009 |
cfi_adjust_cfa_offset (8)
|
|
Packit |
6c4009 |
cfi_rel_offset (r7, 0)
|
|
Packit |
6c4009 |
cfi_rel_offset (lr, 4)
|
|
Packit |
6c4009 |
mov r7, ip
|
|
Packit |
6c4009 |
swi 0x0
|
|
Packit |
6c4009 |
pop {r7, pc}
|
|
Packit |
6c4009 |
.fnend
|
|
Packit |
6c4009 |
END (__libc_do_syscall)
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#endif /* __thumb__ */
|