__restore_rt.S revision 7dc2b7b30ddc158a5e7aa6945526eb65d354b96c
14906e5653c57d49f94940f28556009a88c42a583Elliott Hughes/*
24906e5653c57d49f94940f28556009a88c42a583Elliott Hughes * Copyright (C) 2013 The Android Open Source Project
34906e5653c57d49f94940f28556009a88c42a583Elliott Hughes * All rights reserved.
44906e5653c57d49f94940f28556009a88c42a583Elliott Hughes *
54906e5653c57d49f94940f28556009a88c42a583Elliott Hughes * Redistribution and use in source and binary forms, with or without
64906e5653c57d49f94940f28556009a88c42a583Elliott Hughes * modification, are permitted provided that the following conditions
74906e5653c57d49f94940f28556009a88c42a583Elliott Hughes * are met:
84906e5653c57d49f94940f28556009a88c42a583Elliott Hughes *  * Redistributions of source code must retain the above copyright
94906e5653c57d49f94940f28556009a88c42a583Elliott Hughes *    notice, this list of conditions and the following disclaimer.
104906e5653c57d49f94940f28556009a88c42a583Elliott Hughes *  * Redistributions in binary form must reproduce the above copyright
114906e5653c57d49f94940f28556009a88c42a583Elliott Hughes *    notice, this list of conditions and the following disclaimer in
124906e5653c57d49f94940f28556009a88c42a583Elliott Hughes *    the documentation and/or other materials provided with the
134906e5653c57d49f94940f28556009a88c42a583Elliott Hughes *    distribution.
144906e5653c57d49f94940f28556009a88c42a583Elliott Hughes *
154906e5653c57d49f94940f28556009a88c42a583Elliott Hughes * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
164906e5653c57d49f94940f28556009a88c42a583Elliott Hughes * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
174906e5653c57d49f94940f28556009a88c42a583Elliott Hughes * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
184906e5653c57d49f94940f28556009a88c42a583Elliott Hughes * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
194906e5653c57d49f94940f28556009a88c42a583Elliott Hughes * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
204906e5653c57d49f94940f28556009a88c42a583Elliott Hughes * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
214906e5653c57d49f94940f28556009a88c42a583Elliott Hughes * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
224906e5653c57d49f94940f28556009a88c42a583Elliott Hughes * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
234906e5653c57d49f94940f28556009a88c42a583Elliott Hughes * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
244906e5653c57d49f94940f28556009a88c42a583Elliott Hughes * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
254906e5653c57d49f94940f28556009a88c42a583Elliott Hughes * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
264906e5653c57d49f94940f28556009a88c42a583Elliott Hughes * SUCH DAMAGE.
274906e5653c57d49f94940f28556009a88c42a583Elliott Hughes */
284906e5653c57d49f94940f28556009a88c42a583Elliott Hughes
29851e68a2402fa414544e66650e09dfdaac813e51Elliott Hughes#include <private/bionic_asm.h>
304906e5653c57d49f94940f28556009a88c42a583Elliott Hughes
317dc2b7b30ddc158a5e7aa6945526eb65d354b96cElliott Hughes// This function must have exactly this instruction sequence for gdb and libunwind.
327dc2b7b30ddc158a5e7aa6945526eb65d354b96cElliott Hughes// This function must have exactly this name for gdb.
337dc2b7b30ddc158a5e7aa6945526eb65d354b96cElliott HughesENTRY(__restore_rt)
347dc2b7b30ddc158a5e7aa6945526eb65d354b96cElliott Hughes  mov $__NR_rt_sigreturn, %rax
354906e5653c57d49f94940f28556009a88c42a583Elliott Hughes  syscall
367dc2b7b30ddc158a5e7aa6945526eb65d354b96cElliott HughesEND(__restore_rt)
37